Correct calls to wc_reduce_stock_levels in PayPal and Simplify gateways

Fixes #14186
This commit is contained in:
Mike Jolley 2017-04-10 11:56:52 +01:00
parent 53dfc03178
commit 8fa73602eb
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -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();