Merge pull request #25041 from woocommerce/fix/25039

Fixed "Add payment method" menu highlight in My Account page
This commit is contained in:
Rodrigo Primo 2019-11-18 15:57:52 -03:00 committed by GitHub
commit ec37b2bb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -151,6 +151,8 @@ function wc_get_account_menu_item_classes( $endpoint ) {
$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).
} elseif ( 'payment-methods' === $endpoint && isset( $wp->query_vars['add-payment-method'] ) ) {
$current = true;
}
if ( $current ) {