• Resolved ensalock

    (@ensalock)


    Hey guys,
    I have the following problem:

    When a customer buys a product with the payment ABC (for example prepayment), he gets my special order notification with the order confirmation plus the legal texts in the appendix. This is a customer on hold order.

    When a customer buys a product with the payment XYZ (for example credit card), he also gets my special order notification. This is a customer processing order.

    For the appendix, I used this code in functions.php:

    add_filter( 'woocommerce_email_attachments', 'my_email_attachments', 10, 3);
    function my_email_attachments ( $attachments , $id, $object ) {
    	
    	if( $id === 'customer_on_hold_order' || $id === 'customer_processing_order'){
    
    		$attachment_path = get_template_directory() . '/woocommerce/AGB.pdf';
    		$attachments[] = $attachment_path;
    		
    		$attachment_path = get_template_directory() . '/woocommerce/Widerrufsbelehrung.pdf';
    		$attachments[] = $attachment_path;
    
    	}
    	
    	return $attachments;
    }

    The problem is now, that the customer gets in case of the payment ABC two identical e-mails, when the customer on hold order changes (manually by hand or automatically) to customer processing order – for example when the money of the prepayment has been received. So, how is it possible to disable the notification, when the on hold order changes to processing order?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable Notifiaction to customer, when on hold order changes to processing order’ is closed to new replies.