Small code refactor

This commit is contained in:
Nestor Soriano 2024-09-11 09:04:40 +02:00
parent 5d60619448
commit 6eb2cd991b
No known key found for this signature in database
GPG Key ID: 08110F3518C12CAD
1 changed files with 2 additions and 9 deletions

View File

@ -332,16 +332,9 @@ function wc_body_class( $classes ) {
$account_page_id = get_option( 'woocommerce_myaccount_page_id' );
if ( !empty( $account_page_id ) ) {
if ( get_post_field( 'post_name', $account_page_id ) == basename( $wp->request ) && is_user_logged_in() ) {
$classes[] = 'woocommerce-dashboard';
}
if ( ! empty( $account_page_id ) && ( get_post_field( 'post_name', $account_page_id ) === basename( $wp->request ) && is_user_logged_in() ) ) {
$classes[] = 'woocommerce-dashboard';
}
}
if ( is_store_notice_showing() ) {