Changing the titles on My Account pages in Woocommerce
It can be done using the composite filter hook woocommerce_endpoint_{$endpoint}_title
.
For example if you need to change the My Account "** Account details**" title you will use (where the endpoint is edit-account
):
add_filter( 'woocommerce_endpoint_edit-account_title', 'change_my_account_edit_account_title', 10, 2 );function change_my_account_edit_account_title( $title, $endpoint ) { $title = __( "Edit your account details", "woocommerce" ); return $title;}
Code goes in function.php file of your active child theme (or active theme). Tested and works.
This worked for me to rename the titles of all my account pages:
function wpb_woo_endpoint_title( $title, $id ) { if ( is_wc_endpoint_url( 'orders' ) && in_the_loop() ) { $title = "Deine Buchungen"; } elseif ( is_wc_endpoint_url( 'edit-address' ) && in_the_loop() ) { $title = "Deine Rechnungs- & Behandlungsadresse"; } elseif ( is_wc_endpoint_url( 'payment-methods' ) && in_the_loop() ) { $title = "Deine Bezahlmethoden"; } elseif ( is_wc_endpoint_url( 'edit-account' ) && in_the_loop() ) { $title = "Dein Nutzerkonto"; } return $title; } add_filter( 'the_title', 'wpb_woo_endpoint_title', 10, 2 );