Trigger sync_order on order stats table when refunding (https://github.com/woocommerce/woocommerce-admin/pull/990)
This commit is contained in:
parent
755b9c94f7
commit
5d3c771d45
|
@ -94,6 +94,7 @@ class WC_Admin_Reports_Orders_Data_Store extends WC_Admin_Reports_Data_Store imp
|
||||||
add_action( 'save_post', array( __CLASS__, 'sync_order' ) );
|
add_action( 'save_post', array( __CLASS__, 'sync_order' ) );
|
||||||
// TODO: this is required as order update skips save_post.
|
// TODO: this is required as order update skips save_post.
|
||||||
add_action( 'clean_post_cache', array( __CLASS__, 'sync_order' ) );
|
add_action( 'clean_post_cache', array( __CLASS__, 'sync_order' ) );
|
||||||
|
add_action( 'woocommerce_order_refunded', array( __CLASS__, 'sync_order' ) );
|
||||||
|
|
||||||
if ( ! self::$background_process ) {
|
if ( ! self::$background_process ) {
|
||||||
self::$background_process = new WC_Admin_Order_Stats_Background_Process();
|
self::$background_process = new WC_Admin_Order_Stats_Background_Process();
|
||||||
|
|
Loading…
Reference in New Issue