Merge pull request #14188 from woocommerce/fix/14186

Correct calls to wc_reduce_stock_levels in PayPal and Simplify gateways
This commit is contained in:
Claudio Sanches 2017-04-10 18:50:51 -03:00 committed by GitHub
commit 8bd7e2de4a
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->get_id() );
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->get_id() );
// Remove cart
WC()->cart->empty_cart();