Learn how to remove WooCommerce's auto-generated product schema markup from your shop and product category pages with a simple code snippet. Optimize your site's structured data for better control over your SEO strategy.
You added an SEO plugin, ran a product page through Google’s Rich Results Test, and saw the same Product schema listed twice. That’s usually WooCommerce and your SEO plugin both describing the same product. Search engines don’t reward the duplicate, and you only want one source of truth.
WooCommerce ships its own structured data through the WC_Structured_Data class so products can earn rich snippets like price and ratings without any setup. If nothing else on your site generates that markup, leave it on. But if Yoast WooCommerce SEO, Rank Math, or a dedicated schema plugin is already handling it, WooCommerce’s copy is just noise. Here’s how to switch WooCommerce’s off.
One honest warning before you paste anything: only remove WooCommerce’s schema if something else is producing it. Strip it with nothing to replace it and you can lose your product rich results, the price, rating, and availability that show up under your listing. If you’re not sure whether your SEO plugin outputs Product schema, confirm that first.
Step 1: Open the functions.php file
The functions.php file is where your theme’s custom code lives. In your WordPress Dashboard, go to Appearance > Theme Editor, find functions.php in the file list on the right, and open it. If you run a child theme, edit the child theme’s functions.php so an update to the parent theme doesn’t wipe your change.
If your host hides the Theme Editor, or you’d rather not edit a live file, a code snippets plugin does the same job with an undo button. Same code, safer landing.
Step 2: Add the Code
Scroll to the bottom of functions.php and paste this:
<?php
/**
* Remove the generated product schema markup from the Product Category and Shop pages.
*/
function wc_remove_product_schema_product_archive() {
// Remove the action that generates product data from the WooCommerce Shop page.
remove_action( 'woocommerce_shop_loop', array( WC()->structured_data, 'generate_product_data' ), 10, 0 );
}
// Add the 'wc_remove_product_schema_product_archive' function to the 'woocommerce_init' action.
add_action( 'woocommerce_init', 'wc_remove_product_schema_product_archive' );
/**
* Remove structured data output on all pages.
*/
function wc_remove_output_structured_data() {
// Remove structured data output from the footer of all pages.
remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 );
// Remove structured data output from the email order details section of WooCommerce emails.
remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 );
}
// Add the 'wc_remove_output_structured_data' function to the 'init' action.
add_action( 'init', 'wc_remove_output_structured_data' );The second function is the one doing the real work. It pulls output_structured_data off the wp_footer hook, and that footer output is where WooCommerce prints everything it collected, product schema included. Remove it and the markup stops sitewide, including single product pages. The same function also strips the schema WooCommerce tucks into order emails.
The first function targets the woocommerce_shop_loop hook. On older WooCommerce releases that hook emitted product schema on the Shop and category archives, so keep it if you’re on an older version. On current WooCommerce, core no longer attaches product data to the shop loop (it generates product schema on the single product page instead), so that line is harmless but mostly a no-op now. Leaving it in costs nothing.
If you only want to drop the Product schema and keep the rest of WooCommerce’s structured data, there’s a lighter touch: hook the woocommerce_structured_data_product filter and return an empty array. That removes product markup at the source without stripping the footer output.
Step 3: Save the Changes
Click Update File. That applies the change straight away.
Step 4: Check Your Website
Open a product page and view source, or run it through a validator. If the WooCommerce Product schema is gone, you’re done. If you were putting structured data in order emails, send yourself a test order and check that too.
Two tools make this quick: Google’s Rich Results Test and the Schema Markup Validator. Paste a product URL and confirm you now see one set of Product schema from your SEO plugin, not two.
Why You Might Want to Remove WooCommerce Product Schema Markup
WooCommerce’s default schema is genuinely useful, so don’t remove it on a hunch. A few cases where it makes sense:
- You already run a schema plugin. A tool like Schema and Structured Data for WP, Yoast WooCommerce SEO, or Rank Math outputs its own Product markup. Two copies means duplicate schema, and it’s cleaner to let one own it.
- Your products aren’t chasing rich snippets. If items aren’t for public sale, or you don’t care about price and review snippets in search, the markup isn’t earning anything.
- You want custom markup. When the default output doesn’t match how you want products described, clearing it gives you a blank slate to add your own.
Test It, Then Move On
That’s the whole change. The key thing to get right is the trade: WooCommerce’s schema is off, so make sure your SEO plugin’s version is on and valid before you walk away. Run one product URL through a validator, confirm you see exactly one clean set of Product data, and you’re set.
Next: WooCommerce vs Shopify


