Slow Ajax Call
-
Dear Oscar,
We have noticed that this Ajax call is quite slow:
/?wc-ajax=wcpbc_get_locationTypically, the Ajax call takes between 1.2 – 1.8 seconds.
Is there a way to speed up this Ajax call?
We are referring to this setting:
Cache support (Geolocation with cache support)
Load product prices in the background (Enable this option to refresh the prices via AJAX. It’ll run an AJAX request per page)We tried the following solution and it works but has one drawback:
– we include the plugin files (/wp-content/plugins/woocommerce-product-price-based-on-countries/) in a Cookie Banner setting that only activates these files when the cookie banner has been accepted or rejected. In other words, the Ajax call takes place after the initial load of the site.
– the downside is that the prices shown initially are for the base/home country before the Ajax call switches the prices to the visitor’s country. As the home country prices are lower than the site visitor’s local country prices, it creates a frustration for the visitor of not getting the best prices.We look forward to your suggestions.
Many thanks for your help on this.
Piet
You must be logged in to reply to this topic.