Wordpress LScache Plugin: Support for Aelia Tax display by country
Hi, We have installed the plugin Tax display by country from Aelia. From what I can see in this file aelia-currencyswitcher.cls.php you do support the plugin. Do I need to edit the htaccess file and add a rewrite rule and set a Cache-Vary? Thanks The page I need help with: https://idigdenim.com/ Hi, how does that tax display works ? how did it detect the country ? Best regards, Hi, The Tax display by country detects country by geoip, at least I suppose so because it uses the Geolite database by Maxmind. The plugin is compatible with Aelia currency switcher which we also use. Both plugins use the same cookie aelia_customer_country to set the country and therefore I suppose that the plugin is supported on you side I could be wrong though. Best regards Hi, no , it wont work that way in order to vary on countries , you need to have something to tell the cache engine to vary it , outside of PHP code if you are server admin , then you can enable GeoIP module for the webserver, not the PHP one if not , you can only do it with certain CDN, like QUIC cloud or CloudFlare that sends a country code HTTP header for cache engine to vary on it Best regards, Hi again, but what is the different with the Aelia currency switcher plugin which you support? It sets the currency based on GeoIP and you can vary on currency. The cookie is aelia_cs_selected_currency. Isnt it the same principle for the Aelia Tax display by country which sets the cookie aelia_customer_country? Best regards Hi, because the currency vary is based on cookie on that aelia class file as you mentioned in the first ticket it does NOT require to detect the visitors country for example I am in Euro country where VAT is 20% , and I cached a page, then page displays 20% TAX , then lets say , you from EUR country with VAT 15% , but since the page is already cached with cookie = eur , it wont send/hit PHP again Best regards, Aha so you cant cache a combination of cookies? like this: aelia_cs_selected_currency = Eur aelia_customer_country = FR aelia_cs_selected_currency = Eur aelia_customer_country = DK The aelia_customer_country is also in the class class Aelia_CurrencySwitcher private static $_cookies = array( aelia_cs_selected_currency, aelia_customer_country, aelia_customer_state, aelia_tax_exempt, ) Hi, no , in LSCWP 3rd party support file , it only varies the currency cookie and that , back to the original trick I have mentioned , you need to have something that is NOT PHP (because once page is cached already , PHP wont be invoked again) to tell the cache engine that it needs to fire the PHP again , in which , either a HTTP header comes from CDN , or GeoIP module on webserver (not the GeoIP in PHP) Best regards, Ok, thanks a lot for your answer.