Let's say you want to add products_id 33 and another categories_id 45 just to show you how those would work:
$this->enabled = (MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
Code:
// bof: do not show for categories_id 12 and 45 based on master_categories_id and products_id 33
if (!IS_ADMIN_FLAG) {
global $cart;
$chk_cat = $_SESSION['cart']->in_cart_check('master_categories_id','12');
$chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','45');
$chk_cat += $_SESSION['cart']->in_cart_check('products_id','33');
if ($chk_cat > 0) {
$this->enabled = false;
}
}
// eof: do not show for categories_id 12 and 45 based on master_categories_id and products_id 33
the += keeps adding on to the count for $chk_cat for each categories_id where master_categories_id matches and for specific products_id where the products_id matches ...
The $_SESSION['cart']->in_cart_check can check cart content based on many things, and only on occasion is there any reason to touch the actual shopping_cart.php class file to obtain matches for various types of checks regarding what is in the shopping_cart ...