Ensure emails are disabled during this update routine

Closes #8758
This commit is contained in:
Mike Jolley 2015-08-10 21:37:49 +01:00
parent e12493073e
commit 1f5bca4daa
2 changed files with 9 additions and 0 deletions

View File

@ -148,6 +148,12 @@ $refunded_orders = get_posts( array(
'post_status' => array( 'wc-refunded' )
) );
// Ensure emails are disabled during this update routine
remove_all_actions( 'woocommerce_order_status_refunded_notification' );
remove_all_actions( 'woocommerce_order_partially_refunded_notification' );
remove_action( 'woocommerce_order_status_refunded', array( 'WC_Emails', 'send_transactional_email' ) );
remove_action( 'woocommerce_order_partially_refunded', array( 'WC_Emails', 'send_transactional_email' ) );
foreach ( $refunded_orders as $refunded_order ) {
$order_total = get_post_meta( $refunded_order->ID, '_order_total', true );
$refunded_total = $wpdb->get_var( $wpdb->prepare( "

View File

@ -159,6 +159,9 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
== Changelog ==
= 2.4.1 - 10/08/2015 =
* Fix - Tweaked the 2.4 upgrade routine to disable refund emails during update.
= 2.4.0 - 10/08/2015 =
* Feature - Onboarding/setup wizard for new users to handle basic store settings and installation.
* Feature - Improved help tabs with inline video tutorials where applicable.