• Resolved breadf

    (@breadf)


    My site uses WPML. There is an issue with its currency switcher. WPML support said LS cached admin-ajax.php file. I am not sure where I can exclude file. Below is their reply:

    We have found that the issue is caused by the configuration of the LS Cache plugin, because disabling it solves the problem. Our 2nd-tier specialists recommended excluding the admin-ajax.php file from cache.

    If the LS Cache plugin indeed excludes the admin-ajax.php file (this is something you need to ask them), then you must contact them to get the correct configuration for their plugin so the currency switcher can work as expected.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Support litetim

    (@litetim)

    @breadf
    please use 1 ticket only.
    My colleague told you the same thing: https://ww.wp.xz.cn/support/topic/ajax-search-not-work-2/

    Thread Starter breadf

    (@breadf)

    No, this is different. ajax search is solve after I rebuilt the server which was related to Bricks builder’s ajax search function. This one requested by WPML. This issue didn’t solve yet.

    Plugin Support litetim

    (@litetim)

    Thread Starter breadf

    (@breadf)

    Thanks

    Thread Starter breadf

    (@breadf)

    @litetim,

    WPML support replied:

    The Rest API has no impact on the language switcher. The site/WPML is not fetching any info from an external server via the Rest API when switching currencies.

    I’d recommend explaining to them that if LS Cache is deactivated, the currency switcher works correctly, so there must be another configuration causing this behavior.

    Plugin Support qtwrk

    (@qtwrk)

    you are not using WPML’s multi-currency ( WCML ) ? because it supposed to set cookies for currency but I don’t see it , how did you create the mutli-currency ?

    Thread Starter breadf

    (@breadf)

    I use “WPML Multilingual & Multicurrency for WooCommerce”, because I set show currencies based on site language, not client location, so there is no currency cookie.

    Plugin Support qtwrk

    (@qtwrk)

    huh ? how do you pair 7 currencies over 2 languages

    anyway , this will require cookie to differentiate the currency properly

    Thread Starter breadf

    (@breadf)

    @litetim I think “AJAX Cache TTL” may be more related to what WPML mentioned, but I didn’t see a “admin-ajax.php/?action=*” in browser console, just “admin-ajax.php”.

    Thread Starter breadf

    (@breadf)

    I am not sure the mechanism WPML uses regarding the currency control.

    Plugin Support qtwrk

    (@qtwrk)

    https://wpml.org/wcml-hook/wcml_user_store_strategy/

    please try this code snippet to enable currency cookie support.

    Thread Starter breadf

    (@breadf)

    @qtwrk Thanks. I assume this will create 2 * 7 variations of page, right?

    Plugin Support qtwrk

    (@qtwrk)

    yes , unfortunately that’s the cost for multi-language and multi-currency

    Thread Starter breadf

    (@breadf)

    I see. I will check with WPML if there is a way to expose “ajax action” in the url. Then no need for cookie way, right?

    • This reply was modified 8 months ago by breadf.
    Plugin Support qtwrk

    (@qtwrk)

    no , either way this will require a cookie to set like an “anchor” to properly differentiate the language and currency

    in the past I have been spent quite some time and effort on this issue , but due to technical limitation , there is no other way out šŸ™

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘admin-ajax.php cache’ is closed to new replies.