Store Listing Page not working with TranslatePress
-
I am using TranslatePress to translate my website, everything is working fine except the store listing page.
It is working fine on a default language. But when I switch the language it not showing any results.
I just need to see the same information in all languages.So on the map when I switch the language it’s not showing any companies, and the search also not working.
I do not have any errors in the console or fatal errors on the woo status page.
I think that this should be responsible for it and I need to modify it.
function wcfmmp_store_page_wpml_language_switcher( $languages ) {
if ( wcfm_is_store_page() ) {
if ( defined( ‘ICL_SITEPRESS_VERSION’ ) && ! ICL_PLUGIN_INACTIVE && class_exists( ‘SitePress’ ) ) {
global $sitepress;
$author = get_query_var( $this->wcfm_store_url );
$formated_languages = array();$default_lang = $sitepress->get_default_language();
if( !empty( $languages ) ) {
foreach( $languages as $lang => $language ) {
if( $default_lang && ( $default_lang == $language[‘language_code’] ) ) {
$language[‘url’] = site_url() .’/’. $this->wcfm_store_url .’/’. $author;
} else {
$language[‘url’] = site_url() .’/’. $language[‘language_code’] .’/’. $this->wcfm_store_url .’/’. $author;
}
$formated_languages[$lang] = $language;
}
$languages = $formated_languages;
}
}
}return $languages;
}Can you help me to fix this issue?
- The topic ‘Store Listing Page not working with TranslatePress’ is closed to new replies.