modifying-tab-names-in-account-page-for-woocommerce

Modifying Tab Names In Account Page For WooCommerce

Table of Contents

Customize WooCommerce account page tab names easily by adding a simple code snippet to your function.php file. Replace default titles with your preferred names, enhancing user experience and addressing translation issues. Perfect for tailoring your e-commerce site to your specific needs and language preferences.

Original Posts

Modifying Tab Names In Account Page For WooCommerce


As a default setting in WooCommerce, there are six page links in account page. These titles seem weird in some language because of the bad translation. This post will show how to customize tab tiles. All you need to do is to copy and paste to your function.php, then modify “Name” and “textdomain”.

// My Account Navigation
add_filter( 'woocommerce_account_menu_items', 'change_my_account_dashboard_name', 999 );
function change_my_account_dashboard_name( $items ) {
	$items['dashboard'] = __( 'Name1', 'textdomain' );
	$items['orders'] = __( 'Name2', 'textdomain' );
	$items['edit-address'] = __( 'Name3', 'textdomain' );
	$items['edit-account'] = __( 'Name4', 'textdomain' );
	$items['customer-logout'] = __( 'Name5', 'textdomain' );
	return $items;
}

Textdomain is used for multi-language sites. If you are a rookie for WordPress, I guess you don’t need it either. Just delete the whole “__( ‘Name1’, ‘textdomain’ )”, and change to other names, like Main.

Related Posts

The Complete WordPress Customization Tutorial – Just Copy And Paste And Work

🚀 Unlock Ads-Free Experience At $5/year

✓ 14 days free trial ✓ Cancel anytime

Leave a Comment

Your email address will not be published. Required fields are marked *