WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_Response::payment_on_hold() protected WC 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 5.7.1

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

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