Woocommerce log out link problem
-
I have an issue when working with so-called “Profile endpoints”.
When I try to translate the log-out URL for a user, the log-out button of WooCommerce stops working. Once I turn it back to the standard – “customer-logout” it works.
I am attaching an image to show you what I mean.
https://tanchev.net/files_public/link.png
This is the translated version and is not working.My question is, is there anything else I need to do so I can translate those inner links to whatever I desire, or there is just no chance to do so?
Also in order to not create a second topic, I am going to ask a second question regarding WooCommmerce here.
Currently, I am removing the link “Account” from the menu and replacing it with “Log in” and also removing the link “Register” with the link “Log-out” with this code:
add_filter( ‘wp_nav_menu_items’, ‘bbloomer_dynamic_menu_item_label’, 9999, 2 );
function bbloomer_dynamic_menu_item_label( $items, $args ) {
if ( ! is_user_logged_in() ) {
$items = str_replace( “Акаунт”, “Вход”, $items );
}
return $items;
}add_filter( ‘wp_nav_menu_items’, ‘bbloomer_dynamic_menu_item_label2’, 9999, 2 );
function bbloomer_dynamic_menu_item_label2( $items, $args ) {
if ( is_user_logged_in() ) {
$empty_string;
$items = str_replace(“Регистрация”, “Изход”, $items );
}
return $items;
}Is there a better option to do so especially for the second function, because the link stays no matter the fact the string is removed and is still clickable…
Btw, is there someone that knows what is the variable name that contains the log-out link so I can use it when string replacing the register with the log out button?
- The topic ‘Woocommerce log out link problem’ is closed to new replies.