[SOLVED] GSC reports “availability” error for Products Schema when Product Feed Pro for WooCommerce is enabled

A few month ago, I started a Google Shopping Campaign in Adwords. For this kind of campaign, you need to have a Google Product Feed setup (via Google Merchant Center). The products from your catalog are compiled into an XML feed (or CSV or other formats) that are then uploaded automatically into your Google Merchant Center Acount.

Google Adwords-Google Merchant Center-Google Search Console

Long story short, the products are then shown in Google Search Console as well. Here is where the smarts come in: GSC will actually report to you all details about your products. On a very high level, it tells you how many products are active etc. It also shows you which products are NOT being shown on your ads because of some missing/erroneous fields.

For me, a lot of the product were showing that the “availability” field was missing. This field tells Google if the product is In Stock/Out Of Stock. By default, if something is Out Of Stock, it will not be shown.

Digging deeper, I found that this was happening as a direct consequence of some specialized code in the Product Feed Pro plugin of Woocommerce. This is an excellent plugin. There is not another plugin that is as powerful and fast for producing Product Feeds.

There is a code conflict between WooCommerce and Product Feed Pro plugin that causes this error. Read this post related to this conflict.

How Did I Solve This Issue?

A specific filter hook from woocommerce called the ” woocommerce_structured_data_product_offer ” that allows you to overwrite the “availability” filter.

I just removed the filter that was being used by the Product Feed Pro plugin. So, the Product Feed Pro plugin code that was omitting the “availability” field will not longer be executing.

remove_filter( 'woocommerce_structured_data_product_offer', 'woosea_product_delete_meta_price' );

Check the plugin for updates

The author of the “Product Feed Pro” plugin may very well have updated the code to address this issue. Please note that my one liner fix is just that, a “fix”. It is recommended that you check the latest version of the plugin.






Leave a Reply

Your email address will not be published. Required fields are marked *