Skip to content

Instantly share code, notes, and snippets.

@Auke1810
Last active September 13, 2021 07:53
Show Gist options
  • Save Auke1810/30332e7eda87ce8d2919fa5f14e986cc to your computer and use it in GitHub Desktop.
Save Auke1810/30332e7eda87ce8d2919fa5f14e986cc to your computer and use it in GitHub Desktop.
remove all products in array from feed.
<php?
function remove_some_products_from_the_queue( $products, $feed_id ) {
// Products to remove from the feed
$products_to_remove = array(
'20890',
'20891',
'20972',
);
return array_diff( $products, $products_to_remove );
}
add_filter( 'wppfm_products_in_feed_queue', 'remove_some_products_from_the_queue', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment