• Hi, Im trying to make emails that DONT get sent to the customer.
    Ive hacked a little code, not sure if this is the way you would solve it though.
    Made a copy of variable “send_to_customer” other places in the code as well.

    $send_to_customer = ('on' == $this->send_customer);
    $dontsend_to_customer = ('on' == $this->dontsend_customer);
    
    if ( $order_id ) {
    	$this->object = wc_get_order( $order_id );
    	if ( $send_to_customer && !$dontsend_to_customer ) {
    		$this->bcc = $this->recipient;
    		$this->recipient = $this->object->get_billing_email();
    	} else if (!$dontsend_to_customer) {
    		$recipients = explode( ',', $this->recipient );
    		array_push( $recipients, $this->object->get_billing_email() );
    		$this->recipient = implode( ',', $recipients );
    }
    • This topic was modified 6 years, 9 months ago by aecorn.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aecorn

    (@aecorn)

    Seems like i f-ed up the plugin.
    Reverted to working version, and just commented out the line which was troubling me.
    Would be nice if this functionality could be added into the main branch, with another checkbox maybe.

    //array_push( $recipients, $this->object->get_billing_email() );

    Thread Starter aecorn

    (@aecorn)

    Im gonna bump this as my hack got overwritten in an update, and there is still no option for this in the plugin.
    We are using this plugin to send emails to admins, not customers.

    There is no option to send custom mails NOT to customers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dont send to customer option’ is closed to new replies.