-
Available Schema Types (Schema Catalog) -> Product schema have simple and advanced editor. ALL GOOD.
Available Schema Types (Schema Catalog) -> Woocommerce Product Schema DOESN’T have simple neither advanced editor .
WHY?
-
Hello,
Thank you for reaching out about the issue you are facing with the WooCommerce Product Schema in Rank Math.
It seems you are experiencing a discrepancy in the available schema editors between the Product Schema and the WooCommerce Product Schema. This might be due to the specific implementation of the WooCommerce Product Schema in Rank Math.
To address this concern, I recommend checking if you have followed the correct steps to add the WooCommerce Product Schema to your products. You can refer to our detailed guide on how to add the WooCommerce Product Schema here.
If you have followed the steps correctly and are still facing this issue, please provide more details or screenshots of the problem so that we can investigate further and assist you effectively.
If the issue persists, please reply with more information or assign this ticket to a human agent for further assistance.
Thank you for your understanding and cooperation.
Sources:
How to Use Product Schema for WooCommerce Products » Rank Math
Resolving Rank Math Schema Markup Related Issues
Product Schema Type » Rank MathHello,
Thank you for contacting support.
Are you referring to this particular situation?
That is the default behavior for this type of Schema because the data is then added automatically to the page when it’s loaded from the data inside the product details.
If you test the live product pages in the Schema Validator you should see the data: https://validator.schema.org
Don’t hesitate to get in touch if you have any other questions.
Thank you for fast response .
Are you referring to this particular situation? YES
I spent days for finding solution some illogic things for rankmath scheme .
Problem : google gives non critical issues as : Missing field “shippingDetails” (optional) ,hasMerchantReturnPolicy , Missing field “aggregateRating” (optional) ETC.
BY creating GLobal template it creates another product and google rich results see 2 product snippets , 2 merchant listings , for merchant listings another problem critical which comes with wp_price( price with currency symbol which gives critical error )
If woocommerce product schema would have advanced editor it would solve all problems .
1. leaving empty spots would take data as its doing now. for example ( on Product schema( not woocommerce product shema) if you leave price field empty it pick up correct product price without currency symbol.
2. in same way it would be possible to add aditional fields to offer like shipping details
3.it would solve finaly problem with google instead showing 2 product snippets would show 1 same with merchant listings.Why this functionality is still not done ?
Hello,
WooCommerce Product Schema is integrated with WooCommerce and generates the data automatically. Adding an editor can break the integration. We will improve the integration to add the properties. For now, you can use the following filter to extend the WooCommerce Product Schema and add shipping and return details:
add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) { // Return policy $entity['offers']['hasMerchantReturnPolicy']['@type'] = 'MerchantReturnPolicy'; $entity['offers']['hasMerchantReturnPolicy']['applicableCountry'] = 'US'; $entity['offers']['hasMerchantReturnPolicy']['returnPolicyCategory'] = 'https://schema.org/MerchantReturnFiniteReturnWindow'; $entity['offers']['hasMerchantReturnPolicy']['merchantReturnDays'] = 30; $entity['offers']['hasMerchantReturnPolicy']['returnMethod'] = 'https://schema.org/ReturnByMail'; $entity['offers']['hasMerchantReturnPolicy']['returnFees'] = 'https://schema.org/FreeReturn'; // Shipping details $entity['offers']['shippingDetails']['@type'] = 'OfferShippingDetails'; $entity['offers']['shippingDetails']['shippingRate']['@type'] = 'MonetaryAmount'; $entity['offers']['shippingDetails']['shippingRate']['value'] = 5; $entity['offers']['shippingDetails']['shippingRate']['currency'] = 'USD'; $entity['offers']['shippingDetails']['shippingDestination']['@type'] = 'DefinedRegion'; $entity['offers']['shippingDetails']['shippingDestination']['addressCountry'] = 'US'; return $entity; });
Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Also, Advanced Editor and Schema Templates options are only available in the PRO version. Your account doesn’t have a PRO subscription. Please share the email address associated with your PRO account.
Looking forward to helping you.
Jaideep Asrani i thought you know what code you give . It has 0 value .
Your provided code doing the same as i did via Shema builder editor .(global template)
IT CREATES second OFFERS . IT MEANS GOOGLE PICKING UP SECOND MERCHANT LISTINGS : second merchant listings gives critical error because there are no price and other non critical errors.
I thought your provided code will add shipping details and return policy to the end of existing OFFERS without creating second one.
we are doing service for customer who has PRO VERSION .
Hello,
The code will not create a new offers property. It will extend the existing offers property of the WooCommerce Product Schema. Please modify it based on your site’s policy and add it to the site. If the issue persists, please share some screenshots and an affected URL so we can check.
Let us know how that goes. Looking forward to helping you.
OK i will update you why there was second Offers.
your filter function provided was called twice . on core woocommerce product schema and on global template .GLOBAL schema cant be used if you add filter.
i will add all properties to snippet filter and problem should be solved.
Hello,
Keep us updated on the result of adding all properties to the snippet filter.
We look forward to hearing back from you.
Thanks.
Tested all good .
Warning ! ( GLOBAL schema cant be used together with core woocommerce product schema if you add filter. If you add manually properties via filter it will be duplicated )
Hello,
Glad to hear that.
If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.
You must be logged in to reply to this ticket.