WC_Shortcode_My_Account::add_payment_method()
Show the add payment method page.
Method of the class: WC_Shortcode_My_Account{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$result = WC_Shortcode_My_Account::add_payment_method();
WC_Shortcode_My_Account::add_payment_method() WC Shortcode My Account::add payment method code WC 9.2.3
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' ); } }