dashboard.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. * @author WooThemes
  17. * @package WooCommerce/Templates
  18. * @version 2.6.0
  19. */
  20. if ( ! defined( 'ABSPATH' ) ) {
  21. exit; // Exit if accessed directly
  22. }
  23. ?>
  24. <p><?php
  25. /* translators: 1: user display name 2: logout url */
  26. printf(
  27. __( 'Hello %1$s (not %1$s? <a href="%2$s">Log out</a>)', 'woocommerce' ),
  28. '<strong>' . esc_html( $current_user->display_name ) . '</strong>',
  29. esc_url( wc_logout_url( wc_get_page_permalink( 'myaccount' ) ) )
  30. );
  31. ?></p>
  32. <p><?php
  33. printf(
  34. __( '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' ),
  35. esc_url( wc_get_endpoint_url( 'orders' ) ),
  36. esc_url( wc_get_endpoint_url( 'edit-address' ) ),
  37. esc_url( wc_get_endpoint_url( 'edit-account' ) )
  38. );
  39. ?></p>
  40. <?php
  41. /**
  42. * My Account dashboard.
  43. *
  44. * @since 2.6.0
  45. */
  46. do_action( 'woocommerce_account_dashboard' );
  47. /**
  48. * Deprecated woocommerce_before_my_account action.
  49. *
  50. * @deprecated 2.6.0
  51. */
  52. do_action( 'woocommerce_before_my_account' );
  53. /**
  54. * Deprecated woocommerce_after_my_account action.
  55. *
  56. * @deprecated 2.6.0
  57. */
  58. do_action( 'woocommerce_after_my_account' );
  59. /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */