Mina
(@purpleberryservices)
Can you share the screenshot where you would like to remove payment details?
Hi Mina,
“Pay with cash upon delivery” i need to remove from emails customers.
View post on imgur.com
Thank you!
-
This reply was modified 6 years, 4 months ago by
Alex Toma.
Mina
(@purpleberryservices)
Add below line to functions.php file
remove_action( ‘woocommerce_email_before_order_table’, $order, $sent_to_admin, $plain_text, $email );
Mina
(@purpleberryservices)
Sorry do this:
Comment out below line from WooCommerce Template: woocommerce/emails/email-order-details.php
and woocommerce/emails/plain/email-order-details.php
do_action( ‘woocommerce_email_before_order_table’, $order, $sent_to_admin, $plain_text, $email );
Anonymous User 14479022
(@anonymized-14479022)
Or you could just override that with a customised WooCommerce template. For more details on how to get started with that, have a look at: https://docs.woocommerce.com/document/template-structure/
Hi again Mina,
I comment out that line of code in both locations but continue to showing in costumers emails order.
The best solution would be a function i think… Can you provide that please?
I appreciate the effort to help me,
Thank you! 🙂
Mina
(@purpleberryservices)
Hi,
Commenting both line does work on my test site.
Where did you comment it? I mean it should be in your child themes template as specified in https://docs.woocommerce.com/document/template-structure/
Hi MarilizeK,
I use child theme and have other customizations for woocommerce but i don’t find a solution for remove payment methods from header email before order table.
Hi Mina,
I try first modify original woocommerce template files and after on child theme public_html/wp-content/themes/twentysixteen-child/woocommerce/emails/email-order-details.php and public_html/wp-content/themes/twentysixteen-child/plain/email-order-details.php, but not work…
I comment out on line 23
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
Hi Alex,
I didn’t see a reply to your last question and worked on the same thing just now.
The path for html emails you pointed is correct and should work…
The path for plain emails should be:
public_html/wp-content/themes/twentysixteen-child/woocommerce/emails/plain/email-order-details.php
If you mistyped here and actually did put it in the correct folder it should work fine.