Ensure query_vars is set. Closes #17044
This commit is contained in:
parent
7e06a30eea
commit
d72f6ae22c
|
@ -2294,6 +2294,7 @@ if ( ! function_exists( 'woocommerce_account_content' ) ) {
|
|||
function woocommerce_account_content() {
|
||||
global $wp;
|
||||
|
||||
if ( ! empty( $wp->query_vars ) ) {
|
||||
foreach ( $wp->query_vars as $key => $value ) {
|
||||
// Ignore pagename param.
|
||||
if ( 'pagename' === $key ) {
|
||||
|
@ -2305,6 +2306,7 @@ if ( ! function_exists( 'woocommerce_account_content' ) ) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No endpoint found? Default to dashboard.
|
||||
wc_get_template( 'myaccount/dashboard.php', array(
|
||||
|
|
Loading…
Reference in New Issue