Google Structured Data Testing Tool 2 Warnings

Posted in: Newspaper
Post count: 11

I’ve tested the woocommerce product structured data in Google,

Here are the URL:https://parg.co/bbcp

There’re 2 warnings:

Waring:

brand

The brand field is recommended. Please provide a value if available.

warning

This Product is missing a global identifier (e.g. isbn, mpn or gtin8). Please see documentation for valid identifiers.

How shoud I fix it?
BTW, I won’t add these two strings and should try to set the indetifier_exists to no or false.

But what kind of global snippet I can use?

Thank you.

Post count: 35449

Hi,

The brand field is recommended. Please provide a value if available. for this problem you can use the fix from this topic -> https://wordpress.org/support/topic/woocommerce-throwing-major-schema-errors/
This Product is missing a global identifier (e.g. isbn, mpn or gtin8) for this problem, please check this topic -> https://support.google.com/google-ads/thread/9682575?hl=en

Thank you!

Post count: 11

/*
* Rich Snippet Data
* Add missing data not handled by WooCommerce yet
*/
function custom_woocommerce_structured_data_product ($data) {
global $product;

$data['brand'] = 'Your Brand Name';
$data['mpn'] = $product->get_sku() ?? null;

return $data;
}
add_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product' );

For someone who might have the same problem like me.

Post count: 35449

Hi, Thank you for sharing the fix for this problem!
Have a nice day!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.