Skip to content

Instantly share code, notes, and snippets.

@leewillis77

leewillis77/functions.php Secret

Last active Sep 23, 2019
Embed
What would you like to do?
Modify the g:ID element in WooCommerce Google Product Feed extension
<?php
function lw_woocommerce_gpf_feed_item_google( $feed_item, $product ) {
// Modify $feed_item->guid here.
// Note, you may also need to update $feed_item->item_group_id if you have variable products.
return $feed_item;
}
add_filter( 'woocommerce_gpf_feed_item_google', 'lw_woocommerce_gpf_feed_item_google', 11, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment