How to add “WooCommerceProduct” schema to all old products

#88534
  • Hi,

    I have rankmath installed for my woocommerce store. Some of the products have the schema set to “product” but most of the products have “schema” as OFF. If I go to the product page I am able to set the schema manually by selecting “WooCommerceProduct” by using Schema Generator in Schema tab. But I have more than 1000 products. How can I do this for all the products in an automated way?

    Regards,
    Murali

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thank you for getting in touch with us.

    It can be done for products created before installing Rank Math.

    But if you have chosen to use None in the Schema tab after you installed Rank Math, there is not much that can be done.

    For products created before Rank Math, choosing “Product” Schema in WordPress Dashboard > Rank Math > Titles & Meta > Products should do the trick.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi,
    Thanks for your response.
    We have updated this setting and the schema is getting added for all new products. But for old products, it is not getting updated.
    We have almost 1000 products that need to be manually updated. We have to go to woccommerce Backend – edit product – Rank Math SEO – Schema Generator -> Add “WooCommerceProduct” as Schema in use for all these products. Is there any way we can do it in an automated way or any code can be used to update this setting?

    You can take a look at our setting if you have some time, we have shared the sensitive data. Please note this is our production environment and we have given admin access. Hope you will take the required precaution. Thank you.

    Regards,
    Murali

    Hello,

    We are extremely sorry but there is no option to do that.

    The only option I can think of is:
    1. Remove all data related to Rank Math. You can use this filter for that: https://rankmath.com/kb/filters-hooks-api-developer/#clear-rm-data

    2. Then, go to WordPress Dashboard > Rank Math > Titles & Meta > Products and choose the Product Schema as the default Schema for your WooCommerce products.

    3. Then, import your SEO and other data from your previous SEO plugin.

    Do note that all settings you made via Rank Math after installing it WILL BE REMOVED. So, do proceed with caution.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    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.

Viewing 4 replies - 1 through 4 (of 4 total)

The ticket ‘How to add “WooCommerceProduct” schema to all old products’ is closed to new replies.