Quote Originally Posted by carlwhat View Post
never modify core code when you do not have to.

try and play along.

create an auto-loading observer. also this post.

that you want to observer this notifier.

if you have successfully gotten that far, you can then add your code as follows:

PHP Code:
public function updateNotifyShippingUspsUpdateStatus(&$class)
        {
            
$chk_cart 0;
            
$chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id''4854');
            
$chk_cart += $_SESSION['cart']->in_cart_check('products_id''4');
            if (
$chk_cart 0) {
                
$class->enabled false;
            }
        } 
best.
^^ Effectively this. Because by modifying my core code, you'll just have the work erased when a new version comes out (right now working on getting First Class Mail Letter to work).

You can do this by targeting the NOTIFY_SHIPPING_USPS_CHECK_CART notifier on line 352 and having the $contents_ok variable return (boolean) false. This will in effect disable the module if triggered. I can probably write up an observer class sometime later after some testing.