Hi,
I also encountered that error and fixed it with this hack:
// fix an error introduced by woo-poly-integration in Pages::translateShopUrl()
// @see issue link https://github.com/hyyan/woo-poly-integration/issues/566
add_filter('pll_get_archive_url', 'fix_language_switcher_url_error_1', 9, 2);
add_filter('pll_get_archive_url', 'fix_language_switcher_url_error_2', 11, 2);
function fix_language_switcher_url_error_1($url, $language){
global $ARCHIVE_URL_BEFORE_WOO_POLY_HOOK;
$ARCHIVE_URL_BEFORE_WOO_POLY_HOOK = $url;
return $url;
}
function fix_language_switcher_url_error_2($url, $language){
global $ARCHIVE_URL_BEFORE_WOO_POLY_HOOK;
if(is_search()){
$domain = get_option('siteurl');
if(stripos($url, $domain)===false){
$url = $ARCHIVE_URL_BEFORE_WOO_POLY_HOOK;
}
}
return $url;
}
Also opened an issue on github: link https://github.com/hyyan/woo-poly-integration/issues/566