Can someone suggest me if someone logged out from WordPress Woocommerce then click on my account how to change the link?
I want instead of going to the login register page to the other page but only when the user logged out if user login it is fine
Thanks
Use below code will work :
function iconic_account_menu_items( $items ) {
if ( !is_user_logged_in() ) {
$items['information'] = __( 'your_page_name', 'page' );
}
return $items;
}
add_filter( 'woocommerce_account_menu_items', 'iconic_account_menu_items', 10, 1 );
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.