Chuyển đến nội dung Chuyển đến thanh bên

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

Để lại trả lời

Vui lòng giữ đúng chủ đề và tôn trọng người khác. Nếu bạn cần trợ giúp với các vấn đề không liên quan đến bài đăng này, hãy sử dụng Diễn đàn Hỗ trợ của chúng tôi để bắt đầu trò chuyện hoặc gửi vé hỗ trợ.

Bạn có thể sử dụng các thẻ này:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>