email-notifications

Woocommerce Emails - Sending multiple emails based on product count

空扰寡人 提交于 2019-12-11 08:46:18
问题 In Woocommerce, I have a Course product that uses WC Fields to collect student[s] names and email addresses, and custom email template that sends an email when this course product is purchased. As of now, based on the answer in this thread, I am able to collect the email addresses added to those custom fields and send one email to each student as a BCC recipient. I am now trying to have the emails include the student's name and email address in the body of the email, but I do not want all of

Display product ACF value in Woocommerce admin email notifications

徘徊边缘 提交于 2019-12-11 07:57:27
问题 Trying to get an advanced custom field in a woocommerce product to pass to the new order email for the admin. It's only there for the admin reference and is specific to each product. I have tried and this gets it to the backend but not in the email. add_action( 'woocommerce_before_order_itemmeta', 'product_size', 10, 3 ); function product_size( $item_id, $item, $product ){ // Only in backend Edit single Order pages if( current_user_can('edit_shop_orders') ): // The product ID $product_id =

Change email subject for custom order statuses in Woocommerce 3

試著忘記壹切 提交于 2019-12-11 06:55:09
问题 I have successfully changed email subject for Woocommerce processing order (using this thread) : add_filter( 'woocommerce_email_subject_customer_processing_order', 'email_subject_procs_order', 10, 2 ); function email_subject_procs_order( $formated_subject, $order ){ return sprintf( esc_html__( 'Example of subject #%s', 'textdomain'), $order->get_id() ); } But I want send processing order email again with new subject after order status is changed, so I followed this tread to tweak subject etc.

Remove product downloads section in woocommerce email notifications

谁说胖子不能爱 提交于 2019-12-11 02:57:38
问题 I would like to remove the download section from the email template that woocommerce will send after my buyer has placed an order. It doesn’t make sense to send the download link to my buyer when their order is still on hold, processing and refunded state. Refer image below: my current email template for on hold status: <?php /** * Customer on-hold order email * * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-order.php. * * HOWEVER, on occasion

Create additional variables/placeholders for Woocommerce email notifications subject

杀马特。学长 韩版系。学妹 提交于 2019-12-11 02:25:28
问题 When activating new email notifications from Custom order statuses I have this options for Subject placeholders: "You can use the following placeholders: {order_date}, {order_number}, {order_status}, {billing_first_name}, {billing_last_name}, {billing_company}, {blogname}, {site_title}" Is there a way of creating new placeholders for other fields? Basically, I have created a new hidden field called test_pw and I want to be able to add {billing_email} and {test_pw} to my custom emails. I have

laravel 5.5 email notification not updating content

落爺英雄遲暮 提交于 2019-12-10 13:49:47
问题 <?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; class VerifyEmailNotification extends Notification implements ShouldQueue { use Queueable; protected $token; /** * Create a new notification instance. * * @return void */ public function __construct($token) { $this->token = $token; } /** * Get the notification's delivery channels. * * @param

Add the New order email notification attachment to the vendor email

ⅰ亾dé卋堺 提交于 2019-12-10 09:34:09
问题 In WooCommerce, I use woocommerce-product-vendors as multi vendor plugin. After checkout I receive as admin an a new order email notification with the attachment (uploaded file). But the vendor receive the same email but without the attachment. I need that the vendor receive the attachment too. Thanks 回答1: You could try this code with a custom function hooked in woocommerce_email_recipient_new_order filter hook: add_filter('woocommerce_email_recipient_new_order', 'adding_vendor_email', 10, 2)

Get the customer user_id in Woocommerce email footer template

旧街凉风 提交于 2019-12-09 21:48:09
问题 I am trying to get current_user_id in woocommerce custom email template but it returns 0. Does anyone know how to get user_id in email template in wordpress. I get the user id when I use this code in any php template. Below is my code: <?php global $current_user; get_currentuserinfo(); echo '<h4>Your code:</h3>' . $current_user->ID . ''; ?> Here is complete template code link: email-template-code 回答1: You can't get the current user in woocommerce email templates, but you can get the customer

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

我只是一个虾纸丫 提交于 2019-12-09 01:52:31
问题 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

Change “reply to” email address in all Woocommerce emails notifications

独自空忆成欢 提交于 2019-12-08 08:21:33
问题 In Woocommerce, I would like to change the email address that should always be used as the reply address for all emails notifications. How is this possible with Woocommerce? 回答1: The following will change the "Reply to" email address (and name) in all email notifications: add_filter( 'woocommerce_email_headers', 'change_reply_to_email_address', 10, 3 ); function change_reply_to_email_address( $header, $email_id, $order ) { // HERE below set the name and the email address $reply_to_name =