Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created June 15, 2020 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/84595c24731aaae8bf6643b346647412 to your computer and use it in GitHub Desktop.
Save plugin-republic/84595c24731aaae8bf6643b346647412 to your computer and use it in GitHub Desktop.
<?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