Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
The availability is not required in the Product Schema, but for Google Images, this property is required for your product to be eligible for the Related Items feature in Google Images.
Here’s a link for information:
https://developers.google.com/search/docs/advanced/structured-data/product
However, you can try this filter to remove the availability from the product schema:
/**
* Filter to mod product schema.
*
* @param array $entity Snippet Data
* @return array
*/
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
if ( isset( $entity['offers']['availability'] ) ) {
unset( $entity['offers']['availability']);
return $entity;
}});
I hope that helps.
Thank you.
Hello,
Thank you for your response. So if I leave this part of the Product Schema as shown (the default way), will availability be displayed in searches?
![availability](http://www.thewhiskeyshelf.com/wp-content/uploads/2021/12/Capture.jpg)
If it’s still shown, is there any way to remove it in Rank Math Free?
Thank you,
Alex
Hello,
You can add the filter code provided by my colleague to remove the Availability entity from the product schema.
Yes, after adding the filter, you can leave that field as it is and it will not be rendered on the front end.
When the entity will not be available, it would be unlikely for Google to add it in the rich results.
You can follow this guide to add the filter:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope this helps.
Thank you.
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.