WC_Payment_Gateway::add_payment_method()publicWC 3.2.0

Add payment method via account screen. This should be extended by gateway plugins.

Метод класса: WC_Payment_Gateway{}

Хуков нет.

Возвращает

Массив.

Использование

$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->add_payment_method();

Список изменений

С версии 3.2.0 Введена.
С версии 3.2.0 Included here from 3.2.0, but supported from 3.0.0.

Код WC_Payment_Gateway::add_payment_method() WC 9.4.2

public function add_payment_method() {
	return array(
		'result'   => 'failure',
		'redirect' => wc_get_endpoint_url( 'payment-methods' ),
	);
}