WordPress at Your Fingertips
function is not described

WC_Shortcode_My_Account::add_payment_method() public WC 1.0

Show the add payment method page.

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

Return

null. Nothing.

Usage

$result = WC_Shortcode_My_Account::add_payment_method();

Code of WC_Shortcode_My_Account::add_payment_method() WC 5.9.0

public static function add_payment_method() {
	if ( ! is_user_logged_in() ) {
		wp_safe_redirect( wc_get_page_permalink( 'myaccount' ) );
		exit();
	} else {
		do_action( 'before_woocommerce_add_payment_method' );

		wc_get_template( 'myaccount/form-add-payment-method.php' );

		do_action( 'after_woocommerce_add_payment_method' );
	}
}