WC_Order::set_payment_method()
Set the payment method.
Метод класса: WC_Order{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Order = new WC_Order(); $WC_Order->set_payment_method( $payment_method );
- $payment_method(строка)
- Supports WC_Payment_Gateway for bw compatibility with < 3.0.
По умолчанию: ''
Код WC_Order::set_payment_method() WC Order::set payment method WC 9.3.3
public function set_payment_method( $payment_method = '' ) { if ( is_object( $payment_method ) ) { $this->set_payment_method( $payment_method->id ); $this->set_payment_method_title( $payment_method->get_title() ); } elseif ( '' === $payment_method ) { $this->set_prop( 'payment_method', '' ); $this->set_prop( 'payment_method_title', '' ); } else { $this->set_prop( 'payment_method', $payment_method ); } }