Frequently Asked Questions
How to ignore send email with new order made by POS ?
Few my customer have request ignore send order receipt to customer via email with order made by POS. This is guide how to do it .
Add this code below to end of file : your_current_theme/function.php
Add this code below to end of file : your_current_theme/function.php
if(!function_exists('custom_op_woocommerce_email_recipient_customer_invoice')) { function custom_op_woocommerce_email_recipient_customer_invoice($recipient,$_order) { $billing_email = $_order->get_billing_email(); $is_pos = get_post_meta($_order->get_id(),'_op_order_source',true); if($is_pos == 'openpos') { $recipient = ''; } return $recipient; } } add_filter('woocommerce_email_recipient_customer_completed_order','custom_op_woocommerce_email_recipient_customer_invoice',10,2);If you want disable all order email notification made from POS ( included customer + admin) , Add this code below to end of file : your_current_theme/function.php
if(!function_exists('custom_op_woocommerce_disable_email')) { function custom_op_woocommerce_disable_email($recipient,$_order) { global $op_session_data; if($op_session_data) { $recipient = ''; } return $recipient; } } add_filter('woocommerce_email_recipient_customer_completed_order','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_customer_invoice','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_customer_on_hold_order','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_customer_processing_order','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_customer_refunded_order','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_new_order','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_cancelled_order','custom_op_woocommerce_disable_email',10,2); add_filter('woocommerce_email_recipient_failed_order','custom_op_woocommerce_disable_email',10,2);
Last updated Wed, Sep 19 2018 6:50pm