Skip to content Skip to navigation
Back to the main support

How to solve “missing fields” errors in Google Structured Data Types (schemas)

Prerequisites

SEOPress PRO is required to add structured data types to your WordPress site.

If you want to learn more about schemas, we recommend you our free ebook about Structured data types.

The problem

Google Search Console has reported that some of your URL have missing fields in your structured data types such as:

  • Missing field “hasMerchantReturnPolicy” (optional)
  • Missing field “deliveryTime” (optional)

The solution

Using hooks!

Example with the automatic product schema

Below is a snippet to add the 2 missing properties mentioned above (hasMerchantReturnPolicy and deliveryTime) for each product offer (works with simple and variable products).

Of course, the code must been edited to match your needs. You can also optimize it by adding your own product fields (with ACF for example) and add the values dynamically to the schema.

Add it to your functions.php` file of your child theme/theme. Or by using your own plugin / must-use plugin.

If you need help with this code, please open a support ticket from your customer area. We are here to help!