Last active
February 2, 2023 16:43
-
-
Save Auke1810/372eeebf45d463c69da7d361a7b4dd39 to your computer and use it in GitHub Desktop.
Removes specific products from the feed generation process
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
// woocommerce product feed manager (www.marketingrobot.com) | |
// Removes specific products ID's from the feed generation process | |
function wppfm_exclude_product_ids_from_feed( $products_queue, $feed_id ) { | |
$products_to_exclude = array( | |
'20872', | |
'20875', | |
'20876', | |
'20879', | |
'20883', | |
'20895', | |
'20910', | |
); | |
return array_diff( $products_queue, $products_to_exclude ); | |
} | |
add_filter( 'wppfm_products_in_feed_queue', 'wppfm_exclude_product_ids_from_feed', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment