Customizing the WooCommerce “My Account” page is one of the most requested features by developers. This page is vital to the smooth running of its operations. Therefore, this page should have a clean design to allow users to make the most of account management. Moreover, you can customize this page to convert more sales or entice customers to return to your store.
WooCommerce Hide Rename Addresses Tab My Account Page
The “My Account” page is an actual WordPress page that is located under “Pages”, which contains a WooCommerce shortcode. You can use this shortcode to display the default yet complex account management tabs and their unique content on any page.
WooCommerce Hide or Rename a Tab on My Accounts Page
In this brief tutorial, you will learn how to hide and rename a “My Account” page tab using a custom PHP code snippet. If you are familiar with PHP customization, almost anything can be achieved with simple snippets.
By default, the WooCommerce My Account page looks like this:
Steps to Hide the Address Tab on My Accounts Page
Here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to hide the My Accounts page’s address tab.
- Click anywhere on the text editor and scroll to the bottom of the functions.php file. Paste the code at the end:
/** * @ snippet Hide Edit Address Tab @ My Account */ add_filter( 'woocommerce_account_menu_items', 'njengah_remove_address_my_account', 999 ); function njengah_remove_address_my_account( $items ) { unset($items['edit-address']); return $items; }
- Click on the Save changes button at the bottom of the text editor screen.
- You have successfully added the code snippet required to hide the Addresses tab on the My Account page. This will be the outcome on the front end:
Steps to Rename the Addresses Tab on My Accounts Page
Here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to rename the address tab on the My Accounts page.
- Click anywhere on the text editor and scroll to the bottom of the functions.php file. Paste the code at the end:
/** * @ snippet Rename Edit Address Tab @ My Account */ add_filter( 'woocommerce_account_menu_items', 'njengah_rename_address_my_account', 999 ); function njengah_rename_address_my_account( $items ) { $items['edit-address'] = 'Delivery Address'; return $items; }
- Click on the Save changes button at the bottom of the text editor screen.
- You have successfully added the code snippet required to rename the Addresses tab on the My Account page. This will be the outcome on the front end:
However, if you want to disable the Addresses section on the My Account page completely, look for the account endpoints. This can be done by going to the WordPress Dashboard > WooCommerce > Settings > Advanced. Scroll down to Account Endpoints
Delete the Addresses endpoint, flush your permalinks, and the Addresses tab will be completely disabled. However, you should be very careful with these endpoints and only delete them if PHP does not work.
Conclusion
In this post, you have learned how to hide and rename the Addresses Tab on the My Accounts page. Make sure you follow all the steps keenly so that you do not break down your site. Moreover, I have shown you how to delete an account endpoint, but you should be very careful with these endpoints and only delete them if PHP does not work.
Similar Articles
- How to Remove Downloads Menu My Account Page WooCommerce
- How to Change Storefront Theme Product Page Tabs Colors
- How to Create My Account Page In WooCommerce
- How to Hide Order Status In WooCommerce
- How to Remove, Rename and Add Storefront Sorting Options
- How to Hide Downloads From My Account WooCommerce
- How to Hide Price If Zero In WooCommerce
- How to Hide Product Prices Based on User Role Storefront
- How to Remove or Rename Sale Badge WooCommerce Storefront
- How to Hide Read More and Add to Cart Button WooCommerce
- How to Hide Dashboard on the My Account Page WooCommerce
- How to Hide Product Tab Title In WooCommerce
- How to Hide SKU, Category, Tags Meta Product Page WooCommerce
- How to Hide Product SKU In WooCommerce
- How to Redirect to Cart after Login in WooCommerce
- How to Hide Product Gallery In WooCommerce
- How to Get Payment Methods in WooCommerce » Code Example
- How to Hide WooCommerce Registration Form
- How to Change WooCommerce Product Visibility Options
- How to Hide Trailing Zeros WooCommerce