query->get_current_endpoint(); $unauthorized_class = 'ct-woo-unauthorized'; if ( $endpoint === 'lost-password' && empty($_GET['show-reset-form']) ) { $unauthorized_class .= ' ct-request-password-screen'; } return str_replace( 'class="woocommerce"', 'class="woocommerce ' . (is_user_logged_in() ? 'ct-woo-account' : $unauthorized_class) . '"', $output ); } return $output; }, 9999, 4 ); add_action('woocommerce_before_account_navigation', function () { $username = ''; if (get_theme_mod('has_account_page_name', 'no') === 'yes') { $username .= wp_get_current_user()->display_name; } if (get_theme_mod('has_account_page_quick_actions', 'no') === 'yes') { $account_details_url = wc_get_endpoint_url( 'edit-account', '', get_permalink(get_option('woocommerce_myaccount_page_id')) ); $username .= '' . __('Account', 'blocksy') . ' | ' . __("Log out", 'blocksy') . ''; } if (! empty($username)) { $username = '