WC_Gateway_Paypal_Response::payment_on_hold()protectedWC 1.0

Hold order and add note.

{} It's a method of the class: WC_Gateway_Paypal_Response{}

No Hooks.

Return

null. Nothing.

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: ''

Code of WC_Gateway_Paypal_Response::payment_on_hold() WC 6.9.4

protected function payment_on_hold( $order, $reason = '' ) {
	$order->update_status( 'on-hold', $reason );

	if ( isset( WC()->cart ) ) {
		WC()->cart->empty_cart();
	}
}