Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.