hesabixWpTheme/woocommerce/myaccount/dashboard.php

70 lines
2.9 KiB
PHP

<?php
/**
* پیشخوان حساب کاربری — Hesabix2
*
* @see https://woocommerce.com/document/template-structure/
* @package Hesabix2
* @version 4.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$allowed_html = array(
'a' => array(
'href' => array(),
),
);
$orders_url = wc_get_endpoint_url( 'orders' );
$address_url = wc_get_endpoint_url( 'edit-address' );
$account_url = wc_get_endpoint_url( 'edit-account' );
$downloads_url = wc_get_endpoint_url( 'downloads' );
?>
<div class="hesabix-wc-account-dashboard">
<p class="hesabix-wc-account-dashboard__welcome">
<?php
printf(
wp_kses(
/* translators: 1: user name 2: logout url */
__( 'سلام %1$s — <a href="%2$s">خروج از حساب</a>', 'hesabix2' ),
$allowed_html
),
'<strong>' . esc_html( $current_user->display_name ) . '</strong>',
esc_url( wc_logout_url() )
);
?>
</p>
<p class="hesabix-wc-account-dashboard__intro">
<?php esc_html_e( 'از پیشخوان می‌توانید سفارش‌ها، آدرس‌ها و جزئیات حساب خود را مدیریت کنید.', 'hesabix2' ); ?>
</p>
<div class="hesabix-wc-account-dashboard__cards">
<a href="<?php echo esc_url( $orders_url ); ?>" class="hesabix-wc-account-dashboard__card">
<span class="hesabix-wc-account-dashboard__card-title"><?php esc_html_e( 'سفارش‌ها', 'hesabix2' ); ?></span>
<span class="hesabix-wc-account-dashboard__card-desc"><?php esc_html_e( 'مشاهده وضعیت خریدهای اخیر', 'hesabix2' ); ?></span>
</a>
<a href="<?php echo esc_url( $address_url ); ?>" class="hesabix-wc-account-dashboard__card">
<span class="hesabix-wc-account-dashboard__card-title"><?php esc_html_e( 'آدرس‌ها', 'hesabix2' ); ?></span>
<span class="hesabix-wc-account-dashboard__card-desc"><?php esc_html_e( 'ویرایش آدرس صورت‌حساب و ارسال', 'hesabix2' ); ?></span>
</a>
<a href="<?php echo esc_url( $account_url ); ?>" class="hesabix-wc-account-dashboard__card">
<span class="hesabix-wc-account-dashboard__card-title"><?php esc_html_e( 'جزئیات حساب', 'hesabix2' ); ?></span>
<span class="hesabix-wc-account-dashboard__card-desc"><?php esc_html_e( 'نام، ایمیل و گذرواژه', 'hesabix2' ); ?></span>
</a>
<?php if ( wc_get_customer_available_downloads( get_current_user_id() ) ) : ?>
<a href="<?php echo esc_url( $downloads_url ); ?>" class="hesabix-wc-account-dashboard__card">
<span class="hesabix-wc-account-dashboard__card-title"><?php esc_html_e( 'دانلودها', 'hesabix2' ); ?></span>
<span class="hesabix-wc-account-dashboard__card-desc"><?php esc_html_e( 'فایل‌های قابل دانلود', 'hesabix2' ); ?></span>
</a>
<?php endif; ?>
</div>
</div>
<?php
do_action( 'woocommerce_account_dashboard' );
do_action( 'woocommerce_before_my_account' );
do_action( 'woocommerce_after_my_account' );