Hello,
Thank you for contacting Rank Math today.
The product short description will take precedence when generating the description from the %excerpt% on the product page. You can however add the following code to your theme’s functions.php file to get the excerpt from the main description:
/**
* Allow changing the meta description sentence from within the theme.
*
* @param string $description The description sentence.
*/
add_filter( 'rank_math/frontend/description', function( $description ) {
if(is_product()){
global $product;
$desc = wp_strip_all_tags($product->get_description());
return wp_html_excerpt( $desc, 155 );
}
return $description;
});
Looking forward to helping you. 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.