From aed3961ba2bd574384dfa2444a688591b726ffea Mon Sep 17 00:00:00 2001 From: Nicola Mustone Date: Tue, 31 May 2016 08:46:05 +0200 Subject: [PATCH] fix logout endpoint handling --- includes/wc-page-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/wc-page-functions.php b/includes/wc-page-functions.php index 5e079ab8f77..47b5aa9911b 100644 --- a/includes/wc-page-functions.php +++ b/includes/wc-page-functions.php @@ -120,7 +120,9 @@ function wc_nav_menu_items( $items ) { if ( ! empty( $customer_logout ) ) { 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 ] ); } }