Ensure query_vars is set. Closes #17044
This commit is contained in:
parent
7e06a30eea
commit
d72f6ae22c
|
@ -2294,15 +2294,17 @@ if ( ! function_exists( 'woocommerce_account_content' ) ) {
|
||||||
function woocommerce_account_content() {
|
function woocommerce_account_content() {
|
||||||
global $wp;
|
global $wp;
|
||||||
|
|
||||||
foreach ( $wp->query_vars as $key => $value ) {
|
if ( ! empty( $wp->query_vars ) ) {
|
||||||
// Ignore pagename param.
|
foreach ( $wp->query_vars as $key => $value ) {
|
||||||
if ( 'pagename' === $key ) {
|
// Ignore pagename param.
|
||||||
continue;
|
if ( 'pagename' === $key ) {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ( has_action( 'woocommerce_account_' . $key . '_endpoint' ) ) {
|
if ( has_action( 'woocommerce_account_' . $key . '_endpoint' ) ) {
|
||||||
do_action( 'woocommerce_account_' . $key . '_endpoint', $value );
|
do_action( 'woocommerce_account_' . $key . '_endpoint', $value );
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue