-
i watch the latest video on Youtube “Schema issues” I do same code and structure but it not work here the code https://prnt.sc/oPA9tgx1NSxS how I fix it also I use the pro plugin
-
Hello,
We apologize for the issue you are facing with the critical error on the hasMerchant and return schema. Thank you for raising this concern.
To resolve the issue, please ensure that you have followed these steps:
-
Update Rank Math: Make sure that your Rank Math plugin is updated to the latest version. You can check this in your WordPress Dashboard under Plugins.
-
Check Schema Configuration: Navigate to Rank Math SEO → Schema Templates and ensure that you have correctly set up the Merchant Return Policy schema. You can refer to our guide on how to add a Merchant Return Policy at the organization level here.
-
Use the Custom Schema Builder: If you haven’t already, use the Custom Schema Builder to add the MerchantReturnPolicy schema. Here’s a brief overview of how to do it:
- Go to Rank Math SEO → Schema Templates and click on Add New Schema.
- Choose Custom Schema Builder and add the necessary properties using the Add Property and Add Property Group options.
- Set the display conditions appropriately and save your changes.
-
Inspect for Conflicts: If the issue persists, it might be due to a conflict with your theme or other plugins. You can troubleshoot this by installing the Health Check and Troubleshooting plugin and enabling troubleshooting mode to see if the error still occurs without other plugins activated.
-
Clear Cache: After making changes, ensure that you clear all caches, including server cache, to see the updates reflected.
If you continue to experience issues after following these steps, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for your patience, and we hope this helps resolve your issue!
Sources:
How to Add Merchant Return and Shipping Policy in WooCommerce? » Rank Math
Resolving Rank Math Schema Markup Related Issues
Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math
How to Fix "Invalid object type for field ‘item’" » Rank MathHello,
Thank you for contacting Rank Math support.
Please share the affected URL with us. Also, if you have any screenshots have will provide more information about the error, please share them with us. You can share images with us by uploading them to an image hosting site like Imgur, and then sharing the generated URL with us here.
Don’t hesitate to let us know if you need help with anything else.
Hello,
Your
hasMerchantReturnPolicy
property has an invalidreturnFee
property. This should bereturnFees
notreturnFee
. ThehasMerchantReturnPolicy
schema property is not available in the Rank MathProduct
schema by default, which means you have added this manually and caused the error.To rectify it, you will need to find the code that added the
hasMerchantReturnPolicy
schema property and changereturnFee
toreturnFees
.Don’t hesitate to let us know if you need help with anything else.
Hello,
Please remove the previous code you added and add this one to your website instead:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) { if ( empty( $data['richSnippet'] ) || ! in_array( $data['richSnippet']['@type'], [ 'Product', 'ProductGroup' ] ) ) { return $data; } $data['shippingDetails'] = [ '@context' => 'https://schema.org/', '@type' => 'OfferShippingDetails', '@id' => '#shipping_policy', 'deliveryTime' => [ '@type' => 'ShippingDeliveryTime', 'handlingTime' => [ '@type' => 'QuantitativeValue', 'minValue' => 0, 'maxValue' => 1, 'unitCode' => 'DAY', ], 'transitTime' => [ '@type' => 'QuantitativeValue', 'minValue' => 1, 'maxValue' => 5, 'unitCode' => 'DAY' ], ], 'shippingRate' => [ '@type' => 'MonetaryAmount', 'value' => 200, 'currency' => 'PKR', ], 'shippingDestination' => [ '@type' => 'DefinedRegion', 'addressCountry' => 'PK' ] ]; $data['hasMerchantReturnPolicy'] = [ '@context' => 'https://schema.org/', '@type' => 'MerchantReturnPolicy', '@id' => '#merchant_policy', 'applicableCountry' => 'PK', 'returnPolicyCategory' => 'https://schema.org/MerchantReturnFiniteReturnWindow', 'merchantReturnDays' => 7, 'returnMethod' => 'https://schema.org/ReturnByMail', 'returnFees' => 'https://schema.org/FreeReturn' ]; if ( 'Product' === $data['richSnippet']['@type'] ) { $data['richSnippet']['offers']['shippingDetails'] = [ '@id' => '#shipping_policy' ]; $data['richSnippet']['offers']['hasMerchantReturnPolicy'] = ['@id' => '#merchant_policy']; return $data; } if ( empty( $data['richSnippet']['hasVariant'] ) ) { return $data; } foreach ( $data['richSnippet']['hasVariant'] as $key => $value ) { if ( empty( $value['offers'] ) ) { continue; } $data['richSnippet']['hasVariant'][ $key ]['offers']['shippingDetails'] = [ '@id' => '#shipping_policy' ]; $data['richSnippet']['hasVariant'][ $key ]['offers']['hasMerchantReturnPolicy'] = [ '@id' => '#merchant_policy' ]; } return $data; }, 99, 2);
Please make sure to modify the specific details in the code, i.e.
addressCountry
,currency
, etc.You can add the code to your site using any of the methods here.
This code should clear all the errors both for simple as well as for variable products.
Don’t hesitate to let us know if you need help with anything else.
hi can you check again i see again same merchant errors after add this code
can you check this is okay or need to make some changes
https://royalvapery.com/product/hayati-twist-5000-disposable-pod-kit/and also can you check the website is schema work perfect
Hello,
We have further investigated this for you and we can see that the schemas on your pages are working perfectly and the product schema is no longer showing any error or warning.
Don’t hesitate to let us know if you need help with anything else.
Salam brothe how are you
https://prnt.sc/3Bjkdf1Quu59
please check this URL you can see we visit page 2 then why it not canonical to main category page why is missingHello,
When a page is set to
noindex
Rank Math does not add the canonical URL tag to the source of the page because it will be unnecessary. Thenoindex
tag already tells Search Engines to ignore the page.We can see that your pagination pages are set to
noindex
.We hope this helps. Please let us know if you have further questions or concerns.
Thank you.
Thanksni have a general question. We have 10 404 pages i del on my website and also add on gsc removal tools and i m also sure it not interlink to another page i check with screeming frog but still shoing 404 on gsc and screeming frog
How i solve this
Hello,
If you’ve already deleted the 404 pages, added them to Google Search Console’s removal tools, and confirmed that there are no internal links pointing to them, but they’re still showing up in Google Search Console and Screaming Frog, here are a few steps you can try:
– If your website uses any caching mechanisms (including server-side or CDN caching), make sure to clear them. Cached versions of your pages might still be serving the 404 URLs.
– Sometimes, it takes a little time for Google to recrawl your website and update its index. Make sure to request indexing for your site in Google Search Console to speed up the process.
– You can also use other tools like Ahrefs or SEMrush to check if there are any external backlinks or references to these 404 pages that might be causing them to persist.
If the issue continues after these steps, it might just be a matter of time for the changes to fully propagate.
We hope this helps.
Thanks.
i understand if we find any external backlinks then what we need to do I hear about https://support.google.com/webmasters/answer/2648487?hl=en
– this tools can you guide me in depth is this food way or we need to use any other wayHello,
Can you share those URLs with us?
We look forward to hearing back from you.
Thanks.
plese help me how i solve this
https://search.google.com/test/rich-results/result?id=b5X6d46f9V0r5FpcOfv7egHello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
-
The ticket ‘hi i face critial error on hasmerchant and return schema’ is closed to new replies.