Remove the WooCommerce 3.+ JSON/LD Structured Data format

Adding specific HEADER code (script) into a specific Page of WORDPRESS including WOOCOMMERCE products
May 3, 2017
Structured Data for Price and Price ranges for a Product
May 5, 2017

Remove the WooCommerce 3.+ JSON/LD Structured Data format

We can add Adding specific HEADER code (script) into a specific Page of WORDPRESS including WOOCOMMERCE products. It is discussed in one of our blog (

It is discussed in one of our blog (http://manzur-ashraf-seo-melbourne.com/coding/adding-specific-header-code-script-into-a-specific-page-of-joomla-including-woocommerce-products/)

However, Woocommerce 3 automatically adds structured data at footer.

We want to disable that auto-inserted data at footer.

To do that:

<?php // Do not include this if already open! Code goes in theme functions.php.
/*
 * Remove the default WooCommerce 3 JSON/LD structured data format
 */
function remove_output_structured_data() {
  remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // Frontend pages
  remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // Emails
}

add_action( 'init', 'remove_output_structured_data' );

Comments are closed.