Frequently Asked Questions

How to ignore send email with new order made by POS ?
Few my customer have request ignore send order receipt 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

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);


 Last updated Thu, Sep 20 2018 12:50am

Please Wait!

Please wait... it will take a second!