Modifying Tab Names In Account Page For WooCommerce

Outline

    Original Post

    Modifying Tab Names In Account Page For WooCommerce


    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



    Related Posts

    Aron

    A data scientist working in a retail company, with experience in web design and marketing. Recently dives into cryptocurrency and quantitative investing.

    facebook telegram
    Content Protection by DMCA.com

    Leave a Reply

    • Required fields are market * .
    • Your email address will not be published.
    • Please ensure your email address is correct, then you will get a notification once a new comment reply.

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