email-notifications

Send on-hold order status email notification to admin

此生再无相见时 提交于 2019-12-01 05:18:20
问题 I want the admin to receive on hold order notification as well in WooCommerce. Right now, only customers get that notification. I have tried the following codes but it doesn't seem to work. Here is my code: add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 2); function mycustom_headers_filter_function( $headers, $object ) { if ($object == 'customer_on_hold_order') { $headers .= 'BCC: My name <my@email.com>' . "\r\n"; } return $headers; } What should be the

Send an email notification when custom order status changes in WooCommerce

ε祈祈猫儿з 提交于 2019-12-01 01:55:44
I have created a custom order status in my WooCommerce called Back Order ( wc-backorder ): /** * Add custom status to order list */ add_action( 'init', 'register_custom_post_status', 10 ); function register_custom_post_status() { register_post_status( 'wc-backorder', array( 'label' => _x( 'Back Order', 'Order status', 'woocommerce' ), 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop( 'Back Order <span class="count">(%s)</span>', 'Back Order <span class="count">(%s)</span>', 'woocommerce' ) ) ); } /

Add recipients based on user role to failed and cancelled WooCommerce emails

倾然丶 夕夏残阳落幕 提交于 2019-12-01 01:12:09
I want to be able to change who receives the Woocommerce email notifications based on what role the user is when ordering. For example, If the user is logged in as a Wholesale Customer then a different email will be notified. I've found how to change it when a new order is complete using the woocommerce_email_recipient_new_order hook but i can't find any hooks related to the failed or cancelled notifications. add_filter( 'woocommerce_email_recipient_new_order', 'sv_conditional_email_recipient', 10, 2 ); function sv_conditional_email_recipient( $recipient, $order ) { // Bail on WC settings

Add custom meta data into emails as a html styled table with a title in Woocommerce

限于喜欢 提交于 2019-11-30 23:43:29
In WooCommerce, " Get a custom field array values within WooCommerce email order meta " answer code to one of my previous questions, has given me the way to pull fields out of an array from the order post meta data. But how would I take this code and adjust it, to add a heading above the new data and a table around the data, within the email? I would like to add a <h2>Attendee Info</h2> above the output of the fields. In addition I'd like to wrap the field output in a <table> . I would like to add a few of the fields as new columns within the admin Order Table screen, via some sort of function

Send an email notification when order status change from pending to cancelled

流过昼夜 提交于 2019-11-30 19:49:58
问题 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 I'm looking to

Sending an SMS for specific email notifications and order statuses

懵懂的女人 提交于 2019-11-30 16:08:39
With WooCommerce I use a special theme that handle bookings for motorbikes and scooters rental service. I want to get the order related data. I am trying to send an SMS when an email notification is sent to customer for completed , on hold , pending and ** processing** order status. I have use the code below for instance that output the data I need in SMS: $order = new WC_Order($order_id); $status = $order->get_status(); // order status if( 'completed' == $status || 'processing' == $status || 'pending' == $status || 'on-hold' == $status ){ $user_phone = get_post_meta($order_id, '_billing_phone

Adding a custom woocommerce email based on the product attribute

末鹿安然 提交于 2019-11-30 15:45:20
I have tried to adapt the custom email plugin found on https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/ My intention is that if customer choose a product (it is a variable product) that has a specific attribute, a custom email is sent when the customer makes a new order (it has to be sent either it is pending or processing). My atribute slug is "csr-dates". The custom plugin is composed (see the link above) by two files: woocommerce-csr-order-email.php and (stored in "includes" folder) class-wc-csr-order-email.php I guess that the problem is in the class file, which I

Hide shipping address on local pickup in WooCommerce email notifications

♀尐吖头ヾ 提交于 2019-11-30 09:02:23
问题 How do you hide the "Shipping Address" info section in the customers' processing email if "Local Pickup" is chosen? I don't know how to provide code for this. 回答1: Yes it's possible (see the update at the bottom of this page) … overriding WooCommerce templates (copying the WooCommerce plugin templates folder to your active child theme or theme, renaming it woocommerce ). For that please be sure to read the related docs First . Once above correctly done, you have to edit 2 templates located in

Adding a custom woocommerce email based on the product attribute

核能气质少年 提交于 2019-11-29 23:36:02
问题 I have tried to adapt the custom email plugin found on https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/ My intention is that if customer choose a product (it is a variable product) that has a specific attribute, a custom email is sent when the customer makes a new order (it has to be sent either it is pending or processing). My atribute slug is "csr-dates". The custom plugin is composed (see the link above) by two files: woocommerce-csr-order-email.php and (stored in

Sending an SMS for specific email notifications and order statuses

ぃ、小莉子 提交于 2019-11-29 23:25:05
问题 With WooCommerce I use a special theme that handle bookings for motorbikes and scooters rental service. I want to get the order related data. I am trying to send an SMS when an email notification is sent to customer for completed , on hold , pending and ** processing** order status. I have use the code below for instance that output the data I need in SMS: $order = new WC_Order($order_id); $status = $order->get_status(); // order status if( 'completed' == $status || 'processing' == $status ||