Alex
Alex

Reputation: 51

How can i change TEXT in Woocommerce my-account/edit-address

How can I edit the text in WooCommerce my-account/edit-address. I would like to change it from Shipping address to ( Delivery address)

Current text: You have not set up this type of address yet. ( Shipping Address)

Change the text to: You have not set up this type of address yet. ( Delivery Address)

Upvotes: 1

Views: 2855

Answers (2)

itzmekhokan
itzmekhokan

Reputation: 2770

Just add the follows code snippet in your active theme's functions.php -

function change_woocommerce_my_account_get_addresses( $addresses ){
    if( isset( $addresses['shipping'] ) ) $addresses['shipping'] = __( 'Delivery address', 'your-text-domain' );
    return $addresses;
}
add_filter( 'woocommerce_my_account_get_addresses', 'change_woocommerce_my_account_get_addresses' );

Upvotes: 2

IncipientInfo
IncipientInfo

Reputation: 533

You need to make copy of below mention files to your active theme :

Copy These Files From ->

  1. wp-content/plugins/woocommerce/myaccount/my-address.php
  2. wp-content/plugins/woocommerce/myaccount/form-edit-address.php

TO ( Paste Both Files Here ) -> wp-content/themes/(ActiveThemeFolder)/woocommerce/myaccount/

Then Rename "Shipping address" To "Delivery Address" by following below mention way in theme files.

Edit ( my-address.php ) -

$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing address', 'woocommerce' ),
'shipping' => __( 'Shipping address', 'woocommerce' ),
), $customer_id );

To

$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing address', 'woocommerce' ),
'shipping' => __( 'Delivery address', 'woocommerce' ),
), $customer_id );

Edit ( form-edit-address.php ) -

$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'woocommerce' ) : __( 'Shipping address', 'woocommerce' ); 

To

$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'woocommerce' ) : __( 'Delivery address', 'woocommerce' );

Upvotes: 0

Related Questions