Changeset 3001295
- Timestamp:
- 11/24/2023 03:02:47 PM (2 years ago)
- Location:
- agreeme-checkboxes-for-woocommerce
- Files:
-
- 2 edited
-
tags/1.1.0/inc/classes/agrwc-frontend.php (modified) (3 diffs)
-
trunk/inc/classes/agrwc-frontend.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
agreeme-checkboxes-for-woocommerce/tags/1.1.0/inc/classes/agrwc-frontend.php
r2996245 r3001295 151 151 152 152 153 153 //Validate for limiting to specific products with specific cats in cart 154 if (is_array($l_cats) && count($l_cats)) { 155 156 foreach (WC()->cart->get_cart() as $cart_item_key => $values) { 157 if (has_term($l_cats, 'product_cat', $values['product_id'])) { 158 $match_product = true; 159 break; 160 } 161 } 162 }else $match_product = true; 154 163 155 164 … … 430 439 $l_products = $cbx->get_limit_products(); 431 440 //$l_products= explode(",",$cbx->get_limit_products()); 441 $l_cats = $cbx->get_limit_categories(); 432 442 // Getting cart product ids 433 443 $match_product = true; … … 440 450 } 441 451 } 452 453 //Validate for limiting to specific products with specific cats in cart 454 if (is_array($l_cats) && count($l_cats)) { 455 $match_product = false; 456 foreach (WC()->cart->get_cart() as $cart_item_key => $values) { 457 if (has_term($l_cats, 'product_cat', $values['product_id'])) { 458 $match_product = true; 459 break; 460 } 461 } 462 } 463 464 465 442 466 //order total condition added, validate that also.. 443 467 $l_ordertotal = $cbx->get_limit_ordertotal(); -
agreeme-checkboxes-for-woocommerce/trunk/inc/classes/agrwc-frontend.php
r2996245 r3001295 151 151 152 152 153 153 //Validate for limiting to specific products with specific cats in cart 154 if (is_array($l_cats) && count($l_cats)) { 155 156 foreach (WC()->cart->get_cart() as $cart_item_key => $values) { 157 if (has_term($l_cats, 'product_cat', $values['product_id'])) { 158 $match_product = true; 159 break; 160 } 161 } 162 }else $match_product = true; 154 163 155 164 … … 430 439 $l_products = $cbx->get_limit_products(); 431 440 //$l_products= explode(",",$cbx->get_limit_products()); 441 $l_cats = $cbx->get_limit_categories(); 432 442 // Getting cart product ids 433 443 $match_product = true; … … 440 450 } 441 451 } 452 453 //Validate for limiting to specific products with specific cats in cart 454 if (is_array($l_cats) && count($l_cats)) { 455 $match_product = false; 456 foreach (WC()->cart->get_cart() as $cart_item_key => $values) { 457 if (has_term($l_cats, 'product_cat', $values['product_id'])) { 458 $match_product = true; 459 break; 460 } 461 } 462 } 463 464 465 442 466 //order total condition added, validate that also.. 443 467 $l_ordertotal = $cbx->get_limit_ordertotal();
Note: See TracChangeset
for help on using the changeset viewer.