• Resolved ahordii

    (@ahordii)


    Hello there!
    I try to edit Dokan Vendor New Order email template, and hide this email address https://prntscr.com/wmksiq on woocommerce_email_customer_details.
    I added vendor-new-order.php to my theme/dokan/emails. And I’m able to edit some parts there, but how can I change smth on this woocommerce_email_customer_details hook?
    I tried to edit woocommerce email-addresses.php template, by putting it to my theme/woocommerce/emails/email-addresses.php, but no effect.
    Also, I tried to add some stylings to the vendor-new-order.php, like

    address a {
      display: none;
    }

    but also, no effect.
    So the question is, can I edit this part of email notification content with dokan?
    And why overriding woocommerce templates didn’t work?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @ahordii,

    You will need to do two things :

    1. Override this file woocommerce/templates/emails/admin-new-order.php
    2. Remove these lines:

    Line no:25-27
    <?php /* translators: %s: Customer billing full name */ ?>
    <p><?php printf( esc_html__( ‘You’ve received the following order from %s:’, ‘woocommerce’ ), $order->get_formatted_billing_full_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
    <?php

    And commentout line no: 46

    do_action( ‘woocommerce_email_customer_details’, $order, $sent_to_admin, $plain_text, $email );

    This should help you with the requirement you have. Let me know if you have further queries I can help you with ??

    Thread Starter ahordii

    (@ahordii)

    Hey @roshni07 ,
    Thanks for the quick reply.
    I need to remove this address from user email, not from admin.

    Hello @ahordii ,

    If I understand correctly, you want to remove some information of the customer details that goes with the vendor’s new order notification email. Is that right?

    We can do this in two steps.

    First, remove/comment out the do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); from vendor-new-order.php template.

    Then copy the code from woocommerce/templates/emails/email-addresses.php and place it on your vendor-new-order.php template. Make your changes here.

    This is an advanced customization topic, so if you are uncomfortable with the process, please consult with an expert.

    Thank you ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide email address on order notification email’ is closed to new replies.