Thread Starter
JapeNZ
(@japenz)
Would it be possible to add a function that disables the ‘woocommerce_defer_transactional_emails’ filter during the order split, then enables it once the split is complete do you think?
-
This reply was modified 1 year, 11 months ago by
JapeNZ.
Sorry for the very late reply, we did miss your thread.
I got your problem, we will add the function in the next version to fix it for the users who use the filter:
add_filter( 'woocommerce_defer_transactional_emails', '__return_true' );
In the mean time, you can add this code in the functions.php (Child theme) to make the order emails work correctly:
function set_email_filters() {
$email_setting = get_option('new_order_email_option', 'none');
switch ($email_setting) {
case 'for_customers':
add_filter('woocommerce_email_recipient_customer_on_hold_order', '__return_empty_string');
add_filter('woocommerce_email_recipient_customer_processing_order', '__return_empty_string');
break;
case 'for_administrators':
add_filter('woocommerce_email_recipient_new_order', '__return_empty_string');
break;
case 'for_everyone':
add_filter('woocommerce_email_recipient_customer_on_hold_order', '__return_empty_string');
add_filter('woocommerce_email_recipient_customer_processing_order', '__return_empty_string');
add_filter('woocommerce_email_recipient_new_order', '__return_empty_string');
break;
}
}
add_action('init', 'set_email_filters');
Let me know if it works or need any assist.
-
This reply was modified 1 year, 11 months ago by
YoOhw Studio.
-
This reply was modified 1 year, 11 months ago by
YoOhw Studio.