You can exclude certain products from global groups using this filter:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Exclude product IDs from global groups | |
*/ | |
function prefix_exclude_product_ids( $verified, $product_id, $global, $rule ) { | |
// Specify your product IDs here | |
$product_ids = array( 123, 456 ); | |
if( in_array( $product_id, $product_ids ) ) { | |
$verified = false; | |
} | |
return $verified; | |
} | |
add_filter( 'pewc_after_verify_all_products', 'prefix_exclude_product_ids', 10, 4 ); | |
add_filter( 'pewc_after_pewc_verify_categories_rule', 'prefix_exclude_product_ids', 10, 4 ); |
Here’s how to insert the snippet.