dashboard.php
5 years ago
downloads.php
5 years ago
form-add-payment-method.php
5 years ago
form-edit-account.php
5 years ago
form-edit-address.php
5 years ago
form-login.php
3 years ago
form-lost-password.php
5 years ago
form-reset-password.php
5 years ago
lost-password-confirmation.php
5 years ago
my-account.php
5 years ago
my-address.php
5 years ago
my-downloads.php
5 years ago
my-orders.php
5 years ago
navigation.php
5 years ago
orders.php
5 years ago
payment-methods.php
5 years ago
view-order.php
5 years ago
dashboard.php
82 lines
| 1 | <?php |
| 2 | /** |
| 3 | * My Account Dashboard |
| 4 | * |
| 5 | * Shows the first intro screen on the account dashboard. |
| 6 | * |
| 7 | * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/dashboard.php. |
| 8 | * |
| 9 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 10 | * (the theme developer) will need to copy the new files to your theme to |
| 11 | * maintain compatibility. We try to do this as little as possible, but it does |
| 12 | * happen. When this occurs the version of the template file will be bumped and |
| 13 | * the readme will list any important changes. |
| 14 | * |
| 15 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 16 | * @package WooCommerce\Templates |
| 17 | * @version 4.4.0 |
| 18 | */ |
| 19 | |
| 20 | if ( ! defined( 'ABSPATH' ) ) { |
| 21 | exit; // Exit if accessed directly. |
| 22 | } |
| 23 | |
| 24 | $allowed_html = array( |
| 25 | 'a' => array( |
| 26 | 'href' => array(), |
| 27 | ), |
| 28 | ); |
| 29 | ?> |
| 30 | |
| 31 | <p> |
| 32 | <?php |
| 33 | printf( |
| 34 | /* translators: 1: user display name 2: logout url */ |
| 35 | wp_kses( __( 'Hello %1$s (not %1$s? <a href="%2$s">Log out</a>)', 'woocommerce' ), $allowed_html ), |
| 36 | '<strong>' . esc_html( $current_user->display_name ) . '</strong>', |
| 37 | esc_url( wc_logout_url() ) |
| 38 | ); |
| 39 | ?> |
| 40 | </p> |
| 41 | |
| 42 | <p> |
| 43 | <?php |
| 44 | /* translators: 1: Orders URL 2: Address URL 3: Account URL. */ |
| 45 | $dashboard_desc = __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">billing address</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ); |
| 46 | if ( wc_shipping_enabled() ) { |
| 47 | /* translators: 1: Orders URL 2: Addresses URL 3: Account URL. */ |
| 48 | $dashboard_desc = __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ); |
| 49 | } |
| 50 | printf( |
| 51 | wp_kses( $dashboard_desc, $allowed_html ), |
| 52 | esc_url( wc_get_endpoint_url( 'orders' ) ), |
| 53 | esc_url( wc_get_endpoint_url( 'edit-address' ) ), |
| 54 | esc_url( wc_get_endpoint_url( 'edit-account' ) ) |
| 55 | ); |
| 56 | ?> |
| 57 | </p> |
| 58 | |
| 59 | <?php |
| 60 | /** |
| 61 | * My Account dashboard. |
| 62 | * |
| 63 | * @since 2.6.0 |
| 64 | */ |
| 65 | do_action( 'woocommerce_account_dashboard' ); |
| 66 | |
| 67 | /** |
| 68 | * Deprecated woocommerce_before_my_account action. |
| 69 | * |
| 70 | * @deprecated 2.6.0 |
| 71 | */ |
| 72 | do_action( 'woocommerce_before_my_account' ); |
| 73 | |
| 74 | /** |
| 75 | * Deprecated woocommerce_after_my_account action. |
| 76 | * |
| 77 | * @deprecated 2.6.0 |
| 78 | */ |
| 79 | do_action( 'woocommerce_after_my_account' ); |
| 80 | |
| 81 | /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */ |
| 82 |