• Resolved sarzany

    (@sarzany)


    Hi
    the email which sent include cart-item includes the name of the product with SKU and variation size.
    how we can cut the SKU and variation info from there?

    https://ibb.co/60F047r

    just a short product name is enough.

    thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @sarzany,

    Yes, it is possible to hide the product variations and the SKU from the reminder email using the custom code. We have created a custom code to display the product name without SKU and variations in the reminder email. ?

    Kindly add the below provided custom code in the “functions.php” file of your active theme. So the SKU and variation information will not be added with the Product name in the abandoned cart reminder email.
    Path: <WordPress Installation Directory> / wp-content / themes / <Your active theme folder>/ <HERE>

    The code is:

    function modify_name( $name, $v ) {
    
    $product_id = $v->product_id;
    
    if ( isset( $v->variation_id ) && '' != $v->variation_id ) { // variable product
    $prod_name = get_post( $product_id );
    $name = $prod_name->post_title;
    }
    return $name;
    }
    add_filter( 'wcal_after_product_name', 'modify_name', 10, 2 );

    Once you will add the provided code at the respective place, please check and let us know whether the provided code snippet is working fine or not.

    Regards,
    Priyanka Jagtap

    Thread Starter sarzany

    (@sarzany)

    Hi Priyanka,
    I did it on 4-5 different WordPress setups. it’s not working and the mail still sending with all SKU and variation ??

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @sarzany,

    Our dev team has created another solution for this. Below is the link to download the customized “class-wcal-cron.php” file of our plugin which contains the modification i.e. a filter code according to your requirement.
    Link: https://www.dropbox.com/s/hj8i0eyhbrh4nf6/class-wcal-cron.php?dl=0

    Kindly download the file from the above link. Please replace the contents of the existing file “class-wcal-cron.php” with the new “class-wcal-cron.php” via FTP.
    Path: <WordPress Installation Directory> / wp-content / plugins / woocommerce-abandoned-cart / cron /class-wcal-cron.php
    ?
    Once you have replaced the provided file, then kindly add the below provided custom code in the “functions.php” file of your active theme. So the SKU will be removed from the abandoned cart reminder email.

    Path: <WordPress Installation Directory> / wp-content / themes / <Your active theme folder>/ <HERE>

    The code is:

    add_filter( 'wcal_email_sku', 'hide_sku', 10, 2 );
    function hide_sku( $sku, $product_id ) {
    	$sku = '';
    	return $sku;
    }

    Once you will add the provided code at the respective place, please check and let us know whether the provided code snippet is working fine or not.

    Regards,
    Priyanka Jagtap

    Thread Starter sarzany

    (@sarzany)

    I did the last update also on 5 different WordPress setups and still send the email with all SKU details.
    how we can we completely remove all this sku from email template?

    Regards,
    Sina

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘product name in email’ is closed to new replies.