From 36d2c96faac5e81b55910c5e38cc4b6fdb36757e Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Mon, 8 Apr 2019 16:49:44 +0200 Subject: [PATCH] Added is-active class to Orders when looking at individual order under My Account. --- includes/wc-account-functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/wc-account-functions.php b/includes/wc-account-functions.php index 5cc4783f00f..304d6026e10 100644 --- a/includes/wc-account-functions.php +++ b/includes/wc-account-functions.php @@ -149,6 +149,8 @@ function wc_get_account_menu_item_classes( $endpoint ) { $current = isset( $wp->query_vars[ $endpoint ] ); if ( 'dashboard' === $endpoint && ( isset( $wp->query_vars['page'] ) || empty( $wp->query_vars ) ) ) { $current = true; // Dashboard is not an endpoint, so needs a custom check. + } elseif ( 'orders' === $endpoint && isset( $wp->query_vars['view-order'] ) ) { + $current = true; // When looking at individual order, highlight Orders list item (to signify where in the menu the user currently is). } if ( $current ) {