• Resolved gevcen

    (@gevcen)


    Dear,

    How can I hide the SKU from the product title included in the email?
    I don’t want to show the SKU. I only want to show the product name.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter gevcen

    (@gevcen)

    No news here? How can I hide the sku from variable products in the email ?

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @gevcen,

    Currently, it is not directly possible to hide SKU from the reminder emails in our Lite version. However, we have created a custom hook using which you can hide the SKU from the reminder email.
    ?
    Kindly add the below code in the “functions.php” file of your currently active theme. So the SKU will not be added with the Product name in the abandoned cart reminder email?.
    Path to the file: <WordPress Installation Directory>/wp-content/themes/<Your active theme>/<HERE>

    The code is:

    function wcal_product_sku_callback( $wcal_product_sku ) {
    return false;
    }
    add_filter( ‘wcal_product_sku’, ‘wcal_product_sku_callback’, 10 , 2 );

    Once you will add the 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 gevcen

    (@gevcen)

    Dear,

    The code throws a PHP error. See this video : https://gevcen.tinytake.com/tt/NDA0NDkxNV8xMjQzODgwOQ

    Please review the code
    Thanks

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @gevcen,

    I apologize for the inconvenience caused to you due to this.

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

    Kindly download the file from the above link. Please replace the contents of the existing file “wcal_send_email.php” with the new “wcal_send_email.php” via FTP.
    Path: <WordPress Installation Directory> / wp-content / plugins / woocommerce-abandoned-cart / cron /<HERE>
    ?
    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 and other 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

    Hi, Thanks for the solution provided. However I don’t like editing core plugin files as with every update these will be overwritten. Is there not an other, more elegant solution to this problem?

    Hope to hear soon!

    Thanks and stay healthy!
    Philip

    Thread Starter gevcen

    (@gevcen)

    Me too I don’t like it, that’s why I didn’t use the given solution…

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @philip8829 and @gevcen,

    I have discussed this with our development team and we will include the changes done in the above-provided plugin file in the next update of our plugin. So that you can update the plugin in the future. Then, you will just need to add the provided custom code in the functions.php file of your currently active theme.

    Please let me know if you have any questions.

    Regards,
    Priyanka Jagtap

    Hi Priyanka,
    Thanks for including this filter. I see the plugin has been updated. So which functions should I include in the Function.php?

    Hope to hear soon. Thanks for the support!
    All the best.

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @philip8829,

    As I have mentioned earlier, we are going to add that filter in our plugin file in the next update of our plugin. Most probably, we are going to release the next update of this plugin in the next week. I will inform you once we released the update which will have the filter included.

    Let us know if you have any questions.

    Regards,
    Priyanka Jagtap

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @philip8829 and @gevcen,

    We have released an update 5.8.0 of our plugin this week in which we have included the changes done for the filter provided to you.

    Please note that we have changed the filter name from ‘wcal_after_product_name’ to ‘wcal_reminder_email_after_product_name’ so kindly replace the below-provided line of code with the existing line of code present in the filter code added in your theme’s functions.php file.

    Existing code: add_filter( ‘wcal_after_product_name’, ‘modify_name’, 10, 2 );

    Code need to replace:
    add_filter( 'wcal_reminder_email_after_product_name', 'modify_name', 10, 2 );

    Kindly do the same and let us know if you have any questions.

    Regards,
    Priyanka Jagtap

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Why the name of the product shown in email includes SKU?’ is closed to new replies.