Hello,
Thank you for contacting Rank Math today.
Hiding (or removing) this schema value might cause a warning on your product schema but you can set this to InStock for all your products by using the following code in your theme’s functions.php file:
/**
* Filter to mod product schema.
*
* @param array $entity Snippet Data
* @return array
*/
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
$entity['offers']['availability'] = 'https://schema.org/InStock';
return $entity;
});
Looking forward to helping you. Thank you.
Hello Alberto,
thx for your quick reply but this doesn´t help. I need to hide this
Words completely: “Product in stock: Available”
I am sure there is filter to hide this, no matter if it cause a warning
or not. Else, i have to use the version 1.0.431 again, which works fine..
I hope u ´ll find a solution
Thx in advance
Markus
Hello,
You can remove it by adding the following filter to your functions.php
/**
* 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;
});
Looking forward to helping you. Thank you.
​​​​​​
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
If you want we can try logging and taking a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping 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.