Skip to content

Commit

Permalink
Tweak page titles on account pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed May 24, 2016
1 parent 4a1de6f commit cc41c38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions includes/admin/settings/class-wc-settings-accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ public function get_settings() {
),

array(
'title' => __( 'Edit Address', 'woocommerce' ),
'desc' => __( 'Endpoint for the My Account → Edit Address page', 'woocommerce' ),
'title' => __( 'Addresses', 'woocommerce' ),
'desc' => __( 'Endpoint for the My Account → Addresses page', 'woocommerce' ),
'id' => 'woocommerce_myaccount_edit_address_endpoint',
'type' => 'text',
'default' => 'edit-address',
Expand Down
4 changes: 2 additions & 2 deletions includes/class-wc-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ public function get_endpoint_title( $endpoint ) {
$title = __( 'Downloads', 'woocommerce' );
break;
case 'edit-account' :
$title = __( 'Edit Account Details', 'woocommerce' );
$title = __( 'Account Details', 'woocommerce' );
break;
case 'edit-address' :
$title = __( 'Edit Address', 'woocommerce' );
$title = __( 'Addresses', 'woocommerce' );
break;
case 'payment-methods' :
$title = __( 'Payment Methods', 'woocommerce' );
Expand Down
8 changes: 2 additions & 6 deletions templates/myaccount/my-address.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,20 @@
$customer_id = get_current_user_id();

if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
$page_title = apply_filters( 'woocommerce_my_account_my_address_title', __( 'My Addresses', 'woocommerce' ) );
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing Address', 'woocommerce' ),
'shipping' => __( 'Shipping Address', 'woocommerce' )
), $customer_id );
} else {
$page_title = apply_filters( 'woocommerce_my_account_my_address_title', __( 'My Address', 'woocommerce' ) );
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing Address', 'woocommerce' )
), $customer_id );
}

$oldcol = 1;
$col = 1;
$oldcol = 1;
$col = 1;
?>

<h2><?php echo $page_title; ?></h2>

<p>
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', __( 'The following addresses will be used on the checkout page by default.', 'woocommerce' ) ); ?>
</p>
Expand Down

0 comments on commit cc41c38

Please sign in to comment.