{"id":4276,"date":"2022-01-12T16:12:00","date_gmt":"2022-01-12T16:12:00","guid":{"rendered":"https:\/\/www.futurestatemedia.com\/?p=4276"},"modified":"2023-07-04T16:36:12","modified_gmt":"2023-07-04T16:36:12","slug":"fix-woocommerce-schema-data-missing-brand-and-mpn-console-warning","status":"publish","type":"post","link":"https:\/\/www.futurestatemedia.com\/en\/fix-woocommerce-schema-data-missing-brand-and-mpn-console-warning\/","title":{"rendered":"Fix WooCommerce schema data missing brand and mpn console warning"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">By default the WooCommerce Plugin for WordPress doesn&#8217;t add the &#8220;Brand&#8221; and &#8220;MPN&#8221; Schema to WooCommerce product pages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means there&#8217;s a gap in WooCommerce Schema&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you follow the various support threads across <a href=\"https:\/\/wordpress.org\/support\/topic\/woocommerce-throwing-major-schema-errors\/\" target=\"_blank\" rel=\"noopener\">WordPress.org<\/a> and <a href=\"https:\/\/github.com\/woocommerce\/woocommerce\/issues\/22842#issuecomment-467133160\" target=\"_blank\" rel=\"noopener\">Github<\/a> you&#8217;ll run into the end of the trail at <a href=\"https:\/\/github.com\/woocommerce\/woocommerce\/issues\/22896#issuecomment-477074896\" target=\"_blank\" rel=\"noopener\">this comment<\/a> from WooCommerce saying &#8220;Buy this <a href=\"https:\/\/woocommerce.com\/products\/brands\/\" target=\"_blank\" rel=\"noopener\">WooCommerce Brands plugin<\/a> from WooCommerce.com for $29 per year&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For something as fundamental as this, you can be justified in being really frustrated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ultimately the justification from WooCommerce&#8217;s side is that these AREN&#8217;T Essential pieces of Schema &#8211; they actually only generate Google Search Console WARNINGS &#8211; NOT Errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So in theory, these aren&#8217;t a big deal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if you&#8217;re wanting to patch this pot hole you&#8217;ve got a couple of options. There are &#8220;Schema Plugins&#8221; that will help you patch this &#8211; in fact the Yoast SEO WooCommerce Plugin fills the gaps for you &#8211; but it&#8217;s a bit overkill.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We avoid code based solutions like the plague here at Future State Media &#8211; as they need to be &#8220;maintained&#8221; and they regularly break. So this isn&#8217;t great for a robust eCommerce website that serves you &#8211; and not you &#8220;serving it&#8221; like it&#8217;s a needy toddler!<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Code to fix Google Search Console Warnings for Brand and MPN for WooCommerce Schema<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now my advice if you&#8217;re wanting to add a snippet like this to your WooCommerce store is to add it via the &#8220;<a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noopener\">Code Snippets Plugin<\/a>&#8220;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the code:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/*<br>\n* Rich Snippet Data<br>\n* Add missing Schema Not Provided by WooCommerce<br>\n*\/<br>\nfunction custom_woocommerce_structured_data_product ($data) {<br>\nglobal $product;<br>\n$data['brand'] = 'YOUR BRAND NAME HERE';<br>\n$data['mpn'] = $product-&gt;get_sku() ?? null;<br>\nreturn $data;<br>\n}<br>\nadd_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product' );<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Obviously where it says &#8220;YOUR BRAND NAME HERE&#8221; replace that with your brand name (assuming you have a single brand name of products on your store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Things get a bit more involved if you have multiple brands selling from the same store, and at that point I&#8217;d advise speaking to a developer &#8211; or just ponying up the cash for the awesome <a href=\"https:\/\/www.schemaapp.com\/\" target=\"_blank\" rel=\"noopener\">Schema App plugin.<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-schema-app-solutions wp-block-embed-schema-app-solutions\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JCpw5vTuNr\"><a href=\"https:\/\/www.schemaapp.com\/\" target=\"_blank\" rel=\"noopener\">Be found in Search with Structured Data at Scale with Schema App<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Be found in Search with Structured Data at Scale with Schema App&#8221; &#8212; Schema App Solutions\" src=\"https:\/\/www.schemaapp.com\/embed\/#?secret=0L8KH9DcNH#?secret=JCpw5vTuNr\" data-secret=\"JCpw5vTuNr\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How to test WooCommerce Product Page Schema Fix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you don&#8217;t know how to independently test the Schema Markup on WooCommerce Product pages for yourself &#8211; without waiting for Search Console to validate the fix, then you should definitely checkout a couple of cool tools:<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">The structured data testing tool from Google<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/search.google.com\/structured-data\/testing-tool\/u\/0\/\" target=\"_blank\" rel=\"noopener\">Click here to go to the structured data testing tool from Google<\/a><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">SEO Site Checkup Schema Checker<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/seositecheckup.com\/tools\/structured-data-test\" target=\"_blank\" rel=\"noopener\">Click here to go to SEOSiteCheckup.com Schema Checker<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default the WooCommerce Plugin for WordPress doesn&#8217;t add the &#8220;Brand&#8221; and &#8220;MPN&#8221; Schema to WooCommerce product pages. This means there&#8217;s a gap in WooCommerce Schema&#8230; If you follow the various support threads across WordPress.org and Github you&#8217;ll run into the end of the trail at this comment from WooCommerce saying &#8220;Buy this WooCommerce Brands&hellip; <a class=\"more-link\" href=\"https:\/\/www.futurestatemedia.com\/en\/fix-woocommerce-schema-data-missing-brand-and-mpn-console-warning\/\">Continue reading <span class=\"screen-reader-text\">Fix WooCommerce schema data missing brand and mpn console warning<\/span><\/a><\/p>","protected":false},"author":3,"featured_media":5391,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[30,25],"tags":[],"class_list":["post-4276","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecommerce-stores","category-seo","entry"],"_links":{"self":[{"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/posts\/4276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/comments?post=4276"}],"version-history":[{"count":0,"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/posts\/4276\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/media\/5391"}],"wp:attachment":[{"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/media?parent=4276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/categories?post=4276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.futurestatemedia.com\/en\/wp-json\/wp\/v2\/tags?post=4276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}