How to get order recipient on WooCommerce mail template - wordpress

I need to get woocommerce_new_order_recipient in my email-order-details.php template mail because I need to hide the product price row if the recipient is not test#test.com.
How can I do that?
Thanks all.

Related

I want to display only the product name in the WooCommerce mail template

I want to delete only the id information of "woocommerce email order meta" in the WooCommerce email template.
In other words, I want a list of only product names.
No amount or id required. Only the name of the product.
Do you have a short code etc.?

How to send invoice with pay now link automatically in woocommerce?

I want to send the invoice with checkout link automatically via email when customer order product in woocommerce ( Although manually email can be sent )
You can override the default Email Invoice template or create a custom email template and add the payment link using get_checkout_payment_url().

How to show catgories name on woocommerce order emails Table list

I want to show custom value on woocommerce order email. See this screen shot https://s.nimbus.everhelper.me/share/1115381/uotnwxg567yh8pnt0e9o if any one know solutions then please inform me. How can i show custom value woocommerce order email.
Thanks,
Ketan.

How to remove custom fields from “WooCommerce Thankyou Order” email?

I have added custom fields to my product. I don't want to display those into "WooCommerce Thankyou Order" email. Please, can someone tell me, how to hide the custom fields?
For ex: I want to hide the details that are highlighted email template
Go WooCommerce in the wordpress Dashboard, click on Email tab. At the end you have Email Template.
In order to override the default email template edit woocommerce/templates/emails/customer-process-proshop/woocommerce/emails/customer-processing-order.php
At least that's WooCommerce instructions says. I do not have a wordpress with commerece to test or check that file but I suppose in there you could decide what information is actually sent to the customer.

Save custom post fields value before Woocommerce email send

I have an issue regarding emails sent by Woocommerce.
I have multiple custom fields, set up using the ACF plugin, for Wooocomerce orders. These fields contain additional info that should be visible in the emails sent to the user.
But for some reason I can't get them to save before the email is send and thus the email is empty of those values. Only after I click resend email are the values visible.
I tried prioritizing the action hooks using the Prioritize Hooks plugin but to no avail. Tried multiple things in order to prioritize.
I have the Woocommerce emails set up in the template that I use and get retrieve the custom fields like this:
$fields = get_field('fields', $customer_order->ID);
How can I get this to work properly? Any help is appreciated.
you need to store your data before send the email, so you need to find the correct hook.
If i'm not wrong the before_woocommerce_pay hook is your answer check here for more woocommerce hooks

Resources