WC_Gateway_Paypal_Response::payment_on_hold
Hold order and add note.
Method of the class: WC_Gateway_Paypal_Response{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->payment_on_hold( $order, $reason );
- $order(WC_Order) (required)
- Order object.
- $reason(string)
- Reason why the payment is on hold.
Default:''
WC_Gateway_Paypal_Response::payment_on_hold() WC Gateway Paypal Response::payment on hold code WC 10.4.3
protected function payment_on_hold( $order, $reason = '' ) {
$order->update_status( OrderStatus::ON_HOLD, $reason );
if ( isset( WC()->cart ) ) {
WC()->cart->empty_cart();
}
}