| Server IP : 104.171.130.249 / Your IP : 216.73.216.146 Web Server : nginx/1.25.5 System : Linux 0dac65491b7e 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/matreshka/woocommerce/myaccount/ |
Upload File : |
<?php
/**
* My Account navigation
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/navigation.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
do_action( 'woocommerce_before_account_navigation' );
$current_user = wp_get_current_user();
$user_phone = get_user_meta( $current_user->ID, 'billing_phone', true );
?>
<!-- user-list -->
<section>
<div class="container ">
<div class="container-cart container-user-list">
<!-- <a href="<?php echo esc_url( wc_get_account_endpoint_url( 'edit-account' ) ); ?>" class="user-list-item montserrat-semibold w-100 <?php echo wc_get_account_menu_item_classes( 'edit-account' ); ?>"> -->
<a href="<?php echo esc_url( wc_get_account_endpoint_url( 'edit-account' ) ); ?>" class="user-list-item montserrat-semibold w-100 <?php echo wc_get_account_menu_item_classes( 'edit-account' ); ?>">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/userName.svg' ); ?>" alt="" class="me-2">
<div>
<p><?php echo esc_html( $current_user->display_name ); ?></p>
<?php if ( $user_phone ) : ?>
<span class="montserrat-medium"><?php echo esc_html( $user_phone ); ?></span>
<?php endif; ?>
</div>
</a>
<?php
// Get the History page - first try by template, then by slug
$history_page = get_pages( array(
'meta_key' => '_wp_page_template',
'meta_value' => 'page-history.php',
'number' => 1
) );
if ( ! empty( $history_page ) ) {
$history_url = get_permalink( $history_page[0]->ID );
} else {
// Fallback to orders page if History page not created yet
$history_url = wc_get_account_endpoint_url( 'orders' );
}
?>
<a href="<?php echo esc_url( $history_url ); ?>" class="user-list-item montserrat-semibold w-100">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/list.svg' ); ?>" alt="" class="me-2">
<div>
<p>История покупок</p>
</div>
</a>
<a href="<?php echo esc_url( home_url( '/promotions/' ) ); ?>" class="user-list-item montserrat-semibold w-100">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/sell.svg' ); ?>" alt="" class="me-2">
<div>
<p>Акции и скидки</p>
<span class="montserrat-medium">Заказывайте с выгодой</span>
</div>
</a>
<a href="<?php echo esc_url( home_url( '/delivery-payment/' ) ); ?>" class="user-list-item montserrat-semibold w-100">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/truckDelivery.svg' ); ?>" alt="" class="me-2">
<div>
<p>Условия доставки и оплаты</p>
</div>
</a>
<a href="<?php echo esc_url( home_url( '/about-service/' ) ); ?>" class="user-list-item montserrat-semibold w-100">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/chat_info.svg' ); ?>" alt="" class="me-2">
<div>
<p>О сервисе</p>
</div>
</a>
<a href="<?php echo esc_url( wc_logout_url() ); ?>" class="user-list-item montserrat-semibold w-100">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/exit.svg' ); ?>" alt="" class="me-2">
<div>
<p>Выход</p>
</div>
</a>
</div>
</div>
</section>
<?php do_action( 'woocommerce_after_account_navigation' ); ?>