WordPress at Your Fingertips
function is not described

WC_Payment_Gateway::add_payment_method() public WC 3.2.0

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

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

No Hooks.

Return

Array.

Usage

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

Changelog

Since 3.2.0 Introduced.
Since 3.2.0 Included here from 3.2.0, but supported from 3.0.0.

Code of WC_Payment_Gateway::add_payment_method() WC 5.5.2

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