Changing Schema Type for Product
-
The following seems to still output the structured data:
function filter_woocommerce_structured_data( $markup ) { $markup['@type'] = "Product"; } add_filter( 'woocommerce_structured_data_product', 'filter_woocommerce_structured_data', 10, 2 );How do I go about changing the product type to another type such as Book? Changing the value to anything other than “Product” like below, seems to break the structure output entirely.
function filter_woocommerce_structured_data( $markup ) { $markup['@type'] = "Book"; } add_filter( 'woocommerce_structured_data_product', 'filter_woocommerce_structured_data', 10, 2 );
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Changing Schema Type for Product’ is closed to new replies.