Created
February 6, 2018 09:49
-
-
Save grola/62f7cf6bfd4c234bd7535e2739ddcc2b to your computer and use it in GitHub Desktop.
Remove offers from structured data
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