Return a success code when syncing order products in the case of refunds.
On the initial sync, no products will be deleted by the sync method (which was indicating a false negative before this fix).
This commit is contained in:
parent
56a1a30224
commit
28739b7cf7
|
@ -367,6 +367,9 @@ class WC_Admin_Reports_Products_Data_Store extends WC_Admin_Reports_Data_Store i
|
|||
array( '%d' )
|
||||
); // WPCS: cache ok, DB call ok.
|
||||
|
||||
// Deleting 0 items here isn't a problem, and we should force a successful return.
|
||||
$result = ( 0 === $result ) ? 1 : $result;
|
||||
|
||||
/**
|
||||
* Fires when product's reports are deleted.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue