is_add_payment_method_page()
Is_add_payment_method_page - Returns true when viewing the add payment method page.
Хуков нет.
Возвращает
true|false
.
Использование
is_add_payment_method_page();
Код is_add_payment_method_page() is add payment method page WC 9.4.2
function is_add_payment_method_page() { global $wp; $page_id = wc_get_page_id( 'myaccount' ); return ( $page_id && is_page( $page_id ) && ( isset( $wp->query_vars['payment-methods'] ) || isset( $wp->query_vars['add-payment-method'] ) ) ); }