Home Forums WoodMart support forum woocommerce email customer details

woocommerce email customer details

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #630203

    My WoodMart
    Participant

    I would like to remove this section from all emails. But I don’t want to overwrite the templates. None of the above codes work. Does the theme have any custom solutions?

    add_action(‘woocommerce_email_customer_details’, ‘remove_customer_details_section’, 10, 3);
    function remove_customer_details_section($order, $sent_to_admin, $plain_text) {
    if (did_action(‘woocommerce_email_customer_details’) > 1) {
    remove_action(‘woocommerce_email_customer_details’, ‘woocommerce_email_customer_details’, 10);
    }
    }

    add_filter(‘woocommerce_email_customer_details_fields’, ‘customize_customer_details’, 10, 3);

    function customize_customer_details($fields, $sent_to_admin, $order) {
    // Usuń szczegóły klienta tylko w e-mailach do klienta
    if (!$sent_to_admin) {
    return [];
    }
    return $fields;
    }

    #630509

    Hung Pham
    Participant

    Hi kidsdial4,

    Thanks for reaching to us.

    The Email templates functionality is related to WooCommerce so our theme cannot influent it. Try to find some plugins for customizing such templates.

    https://woocommerce.com/posts/how-to-customize-emails-in-woocommerce/

    In the meantime, feel free to ask me any questions you may have.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)