• Good I have a problem with WPML and change currency and prices in Woocommerce, is that if change currency still appear prices in the previous way, so I have thought this, not if it is a good solution so ask before putting it into production.

    What I do is add an action in the “init” method that if the wcmlc parameter appears in the url, clears the entire cache of the page so that it generates the cache again. This is the function:

     if (is_admin() || is_user_logged_in()){
    	        return;
            }
    	    if ($this->request->query->has( 'wcmlc' )
                 && function_exists( 'wp_cache_clear_cache' ) ) {
                wp_cache_clear_cache();
            }

    I would like to clarify that the “wcmlc” parameter only appears once when I change the currency, this is the only time that I know that I have changed the currency.

    Could this be done or is it crazy?

    • This topic was modified 4 years, 3 months ago by chiqui3d.
  • The topic ‘Can this be done? WPML Currency’ is closed to new replies.