Created
July 31, 2018 15:04
-
-
Save leewillis77/4947969fc72a5e8406afe3fe5aa3db1f to your computer and use it in GitHub Desktop.
Add custom label to Google Product Feed item
This file contains hidden or 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
<?php | |
function lw_woocommerce_gpf_feed_item_google( $feed_item, $product ) { | |
$feed_item->additional_elements['custom_label_0'] = array( 'My custom label' ); | |
return $feed_item; | |
} | |
add_filter( 'woocommerce_gpf_feed_item_google', 'lw_woocommerce_gpf_feed_item_google', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment