Trigger sync_order on order stats table when refunding (https://github.com/woocommerce/woocommerce-admin/pull/990)

This commit is contained in:
Joshua T Flowers 2018-12-05 10:10:22 +08:00 committed by GitHub
parent 755b9c94f7
commit 5d3c771d45
1 changed files with 1 additions and 0 deletions

View File

@ -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' ) );
// TODO: this is required as order update skips save_post.
add_action( 'clean_post_cache', array( __CLASS__, 'sync_order' ) );
add_action( 'woocommerce_order_refunded', array( __CLASS__, 'sync_order' ) );
if ( ! self::$background_process ) {
self::$background_process = new WC_Admin_Order_Stats_Background_Process();