Skip processing `shop_order_refund`s when syncing coupon and tax lookup tables.
This commit is contained in:
parent
ea39313a60
commit
56a1a30224
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue