WC_Gateway_Paypal_Response::payment_on_hold()
Hold order and add note.
Метод класса: WC_Gateway_Paypal_Response{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->payment_on_hold( $order, $reason );
- $order(WC_Order) (обязательный)
- Order object.
- $reason(строка)
- Reason why the payment is on hold.
По умолчанию: ''
Код WC_Gateway_Paypal_Response::payment_on_hold() WC Gateway Paypal Response::payment on hold WC 8.7.0
protected function payment_on_hold( $order, $reason = '' ) { $order->update_status( 'on-hold', $reason ); if ( isset( WC()->cart ) ) { WC()->cart->empty_cart(); } }