Skip processing `shop_order_refund`s when syncing coupon and tax lookup tables.

This commit is contained in:
Jeff Stieler 2019-02-06 19:15:06 -08:00
parent ea39313a60
commit 56a1a30224
2 changed files with 2 additions and 2 deletions

View File

@ -319,7 +319,7 @@ class WC_Admin_Reports_Coupons_Data_Store extends WC_Admin_Reports_Data_Store im
global $wpdb;
$order = wc_get_order( $order_id );
if ( ! $order ) {
if ( ! $order || 'shop_order' !== $order->get_type() ) {
return -1;
}

View File

@ -258,7 +258,7 @@ class WC_Admin_Reports_Taxes_Data_Store extends WC_Admin_Reports_Data_Store impl
public static function sync_order_taxes( $order_id ) {
global $wpdb;
$order = wc_get_order( $order_id );
if ( ! $order ) {
if ( ! $order || 'shop_order' !== $order->get_type() ) {
return -1;
}