Passer au contenu Passer à la barre latérale

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using LiteSpeed Cache with WPML Multilingual & Multicurrency for WooCommerce and the multicurrency feature, switching back to the default currency after selecting a secondary currency may not work correctly. The currency remains stuck, and you need to repeat the operation twice to make it work.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Add the following code to your theme’s functions.php file.
    // WPML - Use Cookie instead of WCSession
    add_filter( 'wcml_user_store_strategy', function ( $strategy, $key ) {
        return 'cookie';
    }, 10, 2 );
            
  • Go to to « LiteSpeed Cache > Cache > Advanced > Vary Cookies« .
  • Add the following cookie: wcml_client_currency

Laisser une réponse

Veuillez rester sur le sujet et être respectueux envers les autres. Si vous avez besoin d'aide pour des problèmes non liés à ce message, utilisez notre Forum de Support pour démarrer une discussion ou soumettre un ticket.

Vous pouvez utiliser ces balises :
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>