Bad redirect in WooCommerce Shop Page
-
I have a multisite configured by subdomain, with a domain mapped in a second site.
I’ve created a function in a plugin and all it’s ok. But, when I click in a language link of Woocommerce shop page, the link is incorrect; the link change the domain (ok) but maintain the original slug, not the slug of the another language.
/The other pages redirect ok/
The function of the plugin:
function agm_add_mlp4menu ($items, $args) { if ( class_exists('Mlp_Helpers') ) { if ( $args->theme_location == 'primary' ){ $output = ''; $output .= Mlp_Helpers::show_linked_elements( array( 'link_text' => 'language_short', 'show_current_blog' => FALSE, 'display_flag' => FALSE ) ); $output = str_replace( '<div class="mlp-language-box mlp_language_box"><ul>', '', $output ); $output = str_replace( '<li>', '<li class="menu-item-language">', $output ); $output = str_replace( '</ul></div>', '', $output ); $items .= $output; } return $items; } } add_filter('wp_nav_menu_items', 'agm_add_mlp4menu', 10, 2);
EXAMPLES
— When I click the link “EN” to change from spanish to english, The link go to
— When I click the link “ES” to change from english to spanish, The link go to
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Bad redirect in WooCommerce Shop Page’ is closed to new replies.