• Resolved markw1984

    (@markw1984)


    I’d like to stop the plugin from automatically adding the selected date into the emails as I’d like to add these manually into a more prominent position which I can format in the email template.

    I’ve found the found in the plugin files which when commented out stop posting the date in the emails, but I’d prefer to use a code snippet to prevent plugin updates removing what I’ve done.

    Does anyone know how to stop this coding using a code snippet?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dina S.

    (@themehighsupport)

    Please check after adding the below code snippet to your child theme’s functions.php file.

    add_filter('woocommerce_email_order_meta_fields', 'th_remove_custom_order_meta_fields', 12, 3);

    function th_remove_custom_order_meta_fields($fields, $sent_to_admin, $order) {
    if(isset($fields['thwdtp_delivery_datepicker'])){
    unset($fields['thwdtp_delivery_datepicker']);
    }
    if(isset($fields['thwdtp_delivery_time'])){
    unset($fields['thwdtp_delivery_time']);
    }
    if(isset($fields['thwdtp_pickup_datepicker'])){
    unset($fields['thwdtp_pickup_datepicker']);
    }
    if(isset($fields['thwdtp_pickup_time'])){
    unset($fields['thwdtp_pickup_time']);
    }

    return $fields;
    }

    Thank you!

    Thread Starter markw1984

    (@markw1984)

    Thank you Dina, that code snippet works great ??

    Do you have any plans to add this option and maybe an option on where the date gets adding in the email in future updates?

    Dina S.

    (@themehighsupport)

    Glad to hear that!

    We have forwarded it to our development team. They will check the feasibility of adding this in the future version of our plugin.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.