By default the WooCommerce Plugin for WordPress doesn’t add the “Brand” and “MPN” Schema to product pages.

If you follow the various support threads across WordPress.org and Github you’ll run into the end of the trail at this comment from WooCommerce saying “Buy this WooCommerce Brands plugin from WooCommerce.com for $29 per year”

For something as fundamental as this, you can be justified in being really frustrated.

Ultimately the justification from WooCommerce’s side is that these AREN’T Essential pieces of Schema – they actually only generate Google Search Console WARNINGS – NOT Errors.

So in theory, these aren’t a big deal.

However, if you’re wanting to patch this pot hole you’ve got a couple of options. There are “Schema Plugins” that will help you patch this – in fact the Yoast SEO WooCommerce Plugin fills the gaps for you – but it’s a bit overkill.

We avoid code based solutions like the plague here at Future State Media – as they need to be “maintained” and they regularly break. So this isn’t great for a robust eCommerce website that serves you – and not you “serving it” like it’s a needy toddler!

 

Code to fix Google Search Console Warnings for Brand and MPN for WooCommerce

Now my advice if you’re wanting to add a snippet like this to your WooCommerce store is to add it via the “Code Snippets Plugin“.

Here’s the code:

/*
* Rich Snippet Data
* Add missing Schema Not Provided by WooCommerce
*/
function custom_woocommerce_structured_data_product ($data) {
global $product;
$data['brand'] = 'YOUR BRAND NAME HERE';
$data['mpn'] = $product->get_sku() ?? null;
return $data;
}
add_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product' );

Obviously where it says “YOUR BRAND NAME HERE” replace that with your brand name (assuming you have a single brand name of products on your store.

Things get a bit more involved if you have multiple brands selling from the same store, and at that point I’d advise speaking to a developer – or just ponying up the cash for the awesome Schema App plugin.

Be found in Search with Structured Data at Scale with Schema App

 

How to test WooCommerce Product Page Schema Fix

If you don’t know how to independently test the Schema Markup on WooCommerce Product pages for yourself – without waiting for Search Console to validate the fix, then you should definitely checkout a couple of cool tools:

 

The structured data testing tool from Google

Click here to go to the structured data testing tool from Google

 

SEO Site Checkup Schema Checker

Click here to go to SEOSiteCheckup.com Schema Checker

 

en_US