Merge pull request #11011 from woothemes/hotfix-logout-endpoint

Fix customer logout endpoint handling
This commit is contained in:
Mike Jolley 2016-05-31 11:29:02 +01:00
commit 4596beac12
1 changed files with 3 additions and 1 deletions

View File

@ -120,7 +120,9 @@ function wc_nav_menu_items( $items ) {
if ( ! empty( $customer_logout ) ) { if ( ! empty( $customer_logout ) ) {
foreach ( $items as $key => $item ) { foreach ( $items as $key => $item ) {
if ( strstr( $item->url, $customer_logout ) ) { $path = parse_url( $item->url, PHP_URL_PATH );
$query = parse_url( $item->url, PHP_URL_QUERY );
if ( strstr( $path, $customer_logout ) || strstr( $query, $customer_logout ) ) {
unset( $items[ $key ] ); unset( $items[ $key ] );
} }
} }