When paypal payment is on hold, reduce stock and empty cart.

Closes #8145
This commit is contained in:
Mike Jolley 2015-05-13 14:28:17 +01:00
parent 2a4f9f77db
commit d19117a108
1 changed files with 2 additions and 0 deletions

View File

@ -62,5 +62,7 @@ abstract class WC_Gateway_Paypal_Response {
*/
protected function payment_on_hold( $order, $reason = '' ) {
$order->update_status( 'on-hold', $reason );
$order->reduce_order_stock();
WC()->cart->empty_cart();
}
}