Sorry guys, digging a little deeper – it looks like it is working on SOME products, but not on others. Even though we don’t have a description set in the Meta snippet. I’ll do some more digging and post the solution if I find it.
Hello,
Thank you for contacting us.
This is the order we follow to generate meta descriptions for WooCommerce products:
1. Content from SEO Description field
If that is missing, then:
2. WooCommerce Excerpt or Product Short Description
If that is missing, then:
3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
If that is missing, then:
4. Auto generated Content from the product page
If you wish to give more preference to the description set in Titles & Meta > Products, then you can add the below code in your theme’s functions.php
file:
add_action( 'rank_math/frontend/description', function( $generated ) {
if ( ! is_product() ) {
return $generated;
}
global $post;
$desc = RankMath\Helper::get_settings( "titles.pt_product_description" );
$desc = RankMath\Helper::replace_vars( $desc, $post );
return empty( $desc ) ? $generated : $desc;
});
Hope this helps.
Thank you.
Thanks Prabhat. The issues seems to have resolved itself, but we didn’t do anything. Does RankMath cache any of this data?
Sorry, I was looking at the Product Title. Your snippet worked, thank-you!
Hello,
We are super happy that we could address your concern. If you have any other questions in the future, know that we are here to help you.
If you don’t mind us asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
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.