For some of my product I need to send an additional pdf (not an invoice) to my customers. With the help of this post: https://wordpress.org/support/topic/attach-pdf-to-confirmation-email-for-specific-product/ I was able to attach an attachment to every order confirmation email. Then I tried to change the code to filter by product sku. In this post I found some infos about the variables that
Tag: email-notifications
Send an email notification with the generated password on WooCommerce user creation
In WooCommerce with code below I create new WP_User with a random password and set user role to “customer” (I want to create account on purchase automatically). Then I use WC_Emails to send login details to buyer. In that case I need plain password, but I really don’t know why all other data are attached (username, name,…), but the password
Display custom order meta data value in email notifications WooCommerce
Based on the following code Add a custom checkbox in WooCommerce checkout which value shows in admin edit order I tried to add my_field_name to order confirmation email. As I understand I have to use woocommerce_email_customer_details. So I came to this solution, unfortunately without the desired result. Answer You have some minor mistakes, via the if condition “$email->id == …”
Set admin email as BCC for WooCommerce cancelled and failed orders
I am currently using this code to send out notifications on failed and cancelled orders. function wc_cancelled_order_add_customer_email( $recipient, $order ) { return $recipient . ‘,’ . $order->…
Always display shipping address in WooCommerce email notifications
WooCommerce used to show shipping address no matter which shipping method was selected during checkout, if you had to hide the shipping address from emails you had to do a custom job like in “https://stackoverflow.com/questions/38936283/hide-shipping-address-on-local-pickup-in-woocommerce-email-notifications/38937106#38937106” answer thread. After new updates, WooCommerce hides the shipping address from the order emails if local pickup is selected during checkout. I want to show
WooCommerce : assign member to shipping zone
is there a way to assign a shipping zone to a member ? I want to do that because I use WooCommerce for a food delivery site and I need to send an email to the closest Restaurant when someone makes an order I was thinking about adding an email field in the shipping zone table like below (sorry my
Trigger email on order custom status change in Woocommerce
I’ve created a custom email class and added it to WooCommerce. When I go to the emails setting in WooCommerce I can see my template there and when I trigger it manually the email arrives at the target email account. Now I have the problem that I’ve added a action to my class which should detect the order status change
Get the user email in Woocommerce “New account” email notification template
In Woocommerce I am trying to customize the “New account” email notification template changing the texts. Currently the default template shows the username but intead I want it to show the user email….
Sorting order items by SKU in Woocommerce
I am trying to order the products by sku within an order in an email in Woocommerce. I have not had any luck with the following code. Some help? Thanks since now! add_filter( ‘…
Send an email notification when order status change from pending to cancelled
In previous versions of Woocommerce, an email notification was sent automatically when an order was changed from pending status to cancelled status (In my case, this happens after an allotted time set in the inventory section of the admin). In WooCommerce 3.0.8 they have removed this automation and labelled as a fix: https://github.com/woocommerce/woocommerce/blob/master/CHANGELOG.txt And the pull request is here: https://github.com/woocommerce/woocommerce/pull/15170/files