Last active
February 6, 2018 09:50
-
-
Save grola/626a6f61ee5f9b56fcb54b849ae1fd55 to your computer and use it in GitHub Desktop.
Remove offers from structured data for Variable Products
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
<?php | |
add_action( 'woocommerce_structured_data_product', 'studiowp_woocommerce_structured_data_product', 10, 2 ); | |
function studiowp_woocommerce_structured_data_product( $markup, $product ) { | |
if ( $product->is_type('variable') ) { | |
unset( $markup['offers'] ); | |
} | |
return $markup; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment