Skip to content

Instantly share code, notes, and snippets.

@leewillis77
Created August 8, 2019 14:37
Show Gist options
  • Save leewillis77/30b421cf95d8f15a5f93fc4e95004ef9 to your computer and use it in GitHub Desktop.
Save leewillis77/30b421cf95d8f15a5f93fc4e95004ef9 to your computer and use it in GitHub Desktop.
Modify feed inclusion in WooCommerce Google Product Feed
<?php
add_filter( 'woocommerce_gpf_exclude_product', function ($excluded, $id, $feed_format ) {
// Return $excluded to follow the calculated logic.
// Return TRUE to exclude a product
// Return FALSE to include it.
return $excluded;
},10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment