email-notifications

Send custom notification In Woocommerce edit order pages repetition issue

混江龙づ霸主 提交于 2019-12-23 03:37:00
问题 I created "email notifier for order tracking" plugin for woocommerce. All works fine and when I save tracking number, it sends an email to customer. But when I save another field in order page, it sends email again. How can I fix it? add_action('add_meta_boxes', 'kargo_takip'); function kargo_takip() { add_meta_box('kargo_takip_meta_box', 'Kargo Takip', 'kargo_takip_meta_box_ekle', 'shop_order', 'side', 'high'); } function kargo_takip_meta_box_ekle() { global $post; $meta_field_data = get

Get customer order count in new order email notification

半城伤御伤魂 提交于 2019-12-22 17:51:28
问题 I'd like to indicate in WooCommerce "new order" email notification, if it's a repeat customer. It seems simple, but I've tried about 5 different methods and none worked. I've tried putting this into 2 different hooks: woocommerce_email_after_order_table woocommerce_email_subject_new_order . Seems like wc_get_customer_order_count($user->ID) should work but it appears that the $user object is not passed into those hook's functions, right? I'm also wondering if this is possible when it's a guest

Add the product description to WooCommerce email notifications

南笙酒味 提交于 2019-12-22 17:43:27
问题 How to add product description/content of single product page (not the short description) to WooCommerce new order email notification? I need to know specific written description of my products as most of them are almost same. 回答1: As you are targeting a specific email notification, first we need to get the Email ID to target the "New Order" email notification. The only way is to get it before and to set the value in a global variable. Then in a custom function hooked in woocommerce_order

Dispatch received orders woocommerce to dealers sending email notifications

我与影子孤独终老i 提交于 2019-12-22 09:44:30
问题 I have a list of emails (dealers) and I need when I receive order in wp-admin i open this order and send this order to a dealer (commercial , user...). Every dealer have an email and mark this order in custom field that he have been send to this dealer. In my woocommerce orders page I need to open a order and do something like this: Order 001 --- > send to Email1@exemple.com = Order 001 - Sent to Email1@exemple.com Order 002 ----> send to Email2@exemple.com = Order 002 - Sent to Email2

Woocommerce email notification recipient conditionally based on custom field

有些话、适合烂在心里 提交于 2019-12-21 23:30:03
问题 I have a checkout form with a custom field. I would like to add an extra recipient to an order email based on the value in the custom field. The custom field is currently a drop down menu with only 3 options. Below is the code I was able to piece together with some googling however this does not appear to work. function sv_conditional_email_recipient( $recipient, $order ) { $custom_field = get_post_meta($orderid, 'custom_field', true); if ($custom_field == "Value 1") { $recipient .= ', email1

Customizing footer text email notiications based on user role in Woocommerce

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 22:43:55
问题 I'm trying to edit the Woocommerce customer emails based on whether the user who ordered was a 'wholesale_customer'. If they are i want to edit the footer text to display a different name and maybe change the logo but at this time the name is more important. I'm using the woocommerce_footer_text function to try and edit but when I test it, the footer text isn't displaying. Can anyone help please? add_filter( 'woocommerce_email_footer_text', 'woocommerce_footer_text', 10, 2 ); function

Display the customer IP Address in new order email notification

别等时光非礼了梦想. 提交于 2019-12-21 22:02:53
问题 When a new order is created, woocommerce will send an email to admin, and I want it to send customer's IP address inside the email as well. But I can't get it work, here is what I got so far: <?php echo get_post_meta( $order->id, '_customer_ip_address', true ); ?> This code goes in mytheme/woocommerce/emails/admin-new-order.php Any ideas? Thanks. 回答1: (added compatibility for WooCommerce versions 3+) Update 2: Added a condition to display the address IP only for Admin New orders notification.

Send a custom reminder email for WooCommerce On-Hold orders after two days

ε祈祈猫儿з 提交于 2019-12-21 21:41:18
问题 My goal is to send an email to the customer containing custom text if the order status is on-hold and if the order creation time is 48 hours or more old. order is 48 hours old or more send email to customer ask customer to pay include a link to the order (to my account payment page) I'm trying to use the code from an answer to one of my previous questions about Automatically cancel order after X days if no payment in WooCommerce. I have lightly changes the code: add_action( 'restrict_manage

WooCommerce Cancelled email notification Not sent when Order expires

China☆狼群 提交于 2019-12-21 20:54:27
问题 I have set up the stock in the woocommerce and configure the time for auto cancel the order after some minutes if payments are not done, it is working fine order is canceled after that period but not an email is generated. I have checked the email address and copy the template to my theme but not made any changes yet, To receive the emails, how To fix this issue? Note: New Order email is receiving but not this order canceled. Here is the status of Woocomerce: ### WordPress Environment ###

WooCommerce email based on shipping zone

丶灬走出姿态 提交于 2019-12-19 10:26:18
问题 I need send email instructions when customer select shipping zone id = 0 (The rest of the world). I found code below, but its based on payment method: add_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions', 10, 2 ); function add_order_email_instructions( $order, $sent_to_admin ) { if ( ! $sent_to_admin ) { if ( 'cod' == $order->payment_method ) { // cash on delivery method echo '<p><strong>Instructions:</strong> Full payment is due immediately upon delivery: <em