add_filter( 'jnews_dropdown_link', 'j_edit_account_dropdown', 99 ); add_filter( 'jnews_mobile_account_url', 'j_change_acocunt_link', 99 ); function j_edit_account_dropdown( $dropdown ) { if ( is_user_logged_in() ) { $new_dropdown = array(); if ( function_exists( 'wc_get_page_permalink' ) ) { $new_dropdown['my_account'] = array( 'text' => __( 'My Acocunt', 'jnews' ), 'url' => wc_get_page_permalink( 'myaccount' ), ); } if ( isset( $dropdown['logout'] ) ) { $new_dropdown['logout'] = $dropdown['logout']; } if ( isset( $new_dropdown ) ) { return $new_dropdown; } } return $dropdown; } function j_change_acocunt_link( $url ) { if ( function_exists( 'wc_get_page_permalink' ) ) { return wc_get_page_permalink( 'myaccount' ); } return $url; }