-
Hi,
For a B2B website with price only available for logged in users (and depending of the users), I need to make prices unavailable for public viewing. I saw the code provided here: https://support.rankmath.com/ticket/hide-product-price/
/** * Filter to modify Rank Math product schema data * Replace $schema_type with schema name like article, review, etc. * @param array $entity Snippet Data * @return array */ add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) { unset($entity['offers']['price']); return $entity; });
which removes it from the Rich Snippet, but I’d be looking to also hide the Opengraph meta generated from the price.
Ex.:
<meta property="product:price:amount" content="2.99">
Thank you!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
You must be logged in to reply to this ticket.