Follow up – Woocommerce Product via CSV upload – Description Meta not updated

#246029
  • Resolved Koolpal
    Rank Math free

    Since the original topic at https://support.rankmath.com/ticket/woocommerce-product-via-csv-upload-description-meta-not-updated/ has been marked as CLOSED, I am providing my response here.

    You may close this topic as well!

    Hi Uzair,

    I hope you read my last massage and UNDERSTOOD the typical process flow a Store Owner would use to create a product.

    If you / your team STILL feel that the below logic holds good, then it appears that you have NEVER understood how a Woocommerce Store operates!

    This is the order we follow to generate meta descriptions for WooCommerce product or product category for that matter:

    1. Content from SEO Description field
    If that is missing, then:
    Description Meta template has been filled. We expect it to auto populate here

    2. WooCommerce Excerpt or Product Short Description
    If that is missing, then:
    Who would keep Product Short Description BLANK? Your CURRENT logic FAILS here!

    3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    Description Meta template has been filled. We expect it to auto populate

    4. Auto-generated Content from the product page.

    If we use the code provided by you, it FORCES the Meta Description template to be applied AS-IS.

    For a specific product if we need to change the meta description then the meta description field is USELESS as the code will override any modifications done for this product!

    Without the code, we have copy paste Some text %sep% %title% %sep% some text (as an example) EVERYTIME we create a new product! This is counterintuitive!

    Any ways, since you are UNABLE to understand this SIMPLE expectation and INSIST on claiming that you are offering a CHOICE, then there is some serious GAP in Communication / Understanding / comprehension!

    Your call!

    Take care, stay safe!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thanks for getting back. Sorry for the delay and any inconvenience that might have been caused due to that.

    Here is a modified code for you, that will only take the description from the Global Settings if you haven’t added any description in the snippet editor. So the order of meta description will be the same as you want it to be:

    1. From the snippet editor of the meta box

    2. Global Settings

    This will not override the description that you have manually set in the snippet editor:

    add_action( 'rank_math/frontend/description', function( $description ) {
     global $post;
     if ( is_product()) {
    	 if (!get_post_meta(get_queried_object_id(), 'rank_math_description', true)) {
    		 $desc = RankMath\Helper::get_settings( "titles.pt_product_description" );
    		 if ( $desc ) {
     		     return RankMath\Helper::replace_vars( $desc, $post );
     		 }
    	 }
     	 
     }
    
     return $description;
    });

    Hope this helps. Let us know if you need any further assistance.

    Thanks for trying to help.

    Using this code, while creating the product ALL MY Team members will have to remember that there is a code snippet which will be updating the Description Meta as per the template.

    It currently displays the actual short description in the meta description field in the admin backend.

    The template is NOT visible when editing the product.

    Can you modify this code snippet such that it displays the template in the edit product as if we have manually used this template?

    Thanks

    Hello,

    We are sorry but we do not have that option.

    But, we have noted this down for improvement and we might offer an option in the backend to override the short description and use the global template instead.

    For now, you can tell your team members that they can ignore what they see in the preview and that the global meta will be used instead of what they are seeing.

    We wish we could offer further assistance but we have already offered you the option we have in such scenario.

    Thanks Uzair,

    I shall eagerly await whenever you release an update to your great plugin with these changes.

    Thanks

    Hello,

    We thank you for your time and patience on this one.

    We will inform you once this feature is added to the plugin. You may keep an eye on our changelog page for further updates: https://rankmath.com/changelog/

    In the meantime, please don’t hesitate to contact us anytime if you need our assistance with anything else. Thank you

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.