ghgh
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
2 changed files
with
82 additions
and
1 deletions
| ... | @@ -5,7 +5,8 @@ add_filter( 'woocommerce_account_menu_items', 'misha_rename_downloads' ); | ... | @@ -5,7 +5,8 @@ add_filter( 'woocommerce_account_menu_items', 'misha_rename_downloads' ); |
| 5 | function misha_rename_downloads( $menu_links ){ | 5 | function misha_rename_downloads( $menu_links ){ |
| 6 | 6 | ||
| 7 | $menu_links[ 'dashboard' ] = 'My Account'; | 7 | $menu_links[ 'dashboard' ] = 'My Account'; |
| 8 | $menu_links[ 'edit-address' ] = 'Address'; | 8 | unset( $menu_links[ 'edit-address' ]); |
| 9 | //$menu_links[ 'edit-address' ] = 'Address'; | ||
| 9 | 10 | ||
| 10 | return $menu_links; | 11 | return $menu_links; |
| 11 | } | 12 | } | ... | ... |
| 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 you can view your <a href="%1$s">recent orders</a>, and <a href="%2$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 you can view your <a href="%1$s">recent orders</a>, and <a href="%2$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-account' ) ) | ||
| 54 | ); | ||
| 55 | ?> | ||
| 56 | </p> | ||
| 57 | |||
| 58 | <?php | ||
| 59 | /** | ||
| 60 | * My Account dashboard. | ||
| 61 | * | ||
| 62 | * @since 2.6.0 | ||
| 63 | */ | ||
| 64 | do_action( 'woocommerce_account_dashboard' ); | ||
| 65 | |||
| 66 | /** | ||
| 67 | * Deprecated woocommerce_before_my_account action. | ||
| 68 | * | ||
| 69 | * @deprecated 2.6.0 | ||
| 70 | */ | ||
| 71 | do_action( 'woocommerce_before_my_account' ); | ||
| 72 | |||
| 73 | /** | ||
| 74 | * Deprecated woocommerce_after_my_account action. | ||
| 75 | * | ||
| 76 | * @deprecated 2.6.0 | ||
| 77 | */ | ||
| 78 | do_action( 'woocommerce_after_my_account' ); | ||
| 79 | |||
| 80 | /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */ |
-
Please register or sign in to post a comment