Correct calls to wc_reduce_stock_levels in PayPal and Simplify gateways
Fixes #14186
This commit is contained in:
parent
53dfc03178
commit
8fa73602eb
|
@ -66,7 +66,7 @@ abstract class WC_Gateway_Paypal_Response {
|
|||
*/
|
||||
protected function payment_on_hold( $order, $reason = '' ) {
|
||||
$order->update_status( 'on-hold', $reason );
|
||||
wc_reduce_stock_levels( $order_id );
|
||||
wc_reduce_stock_levels( $order );
|
||||
WC()->cart->empty_cart();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
|
|||
}
|
||||
|
||||
// Reduce stock levels
|
||||
wc_reduce_stock_levels( $order_id );
|
||||
wc_reduce_stock_levels( $order );
|
||||
|
||||
// Remove cart
|
||||
WC()->cart->empty_cart();
|
||||
|
|
Loading…
Reference in New Issue