WOOCS not working
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Dan on October 3, 2020, 23:48Issues:A) If a site user charges there personal profile the Country selected does not affect the currency shown on products that have prices. Profile >> Personal Options >> Country / Region >> Canada tested - The plugin does not use Canadian Dollars when profile country changed.B) Tested with https://www.locabrowser.com when in Canada, the result is -> Your country is: United States (US). (defined by woocommerce GeoIP functionality)I have done the following:1) Made the following change. -> WooCommerce Settings -> General options -> Default customer location -> Geolocate (with page caching support)2) Made the following change. -> WPRocket -> Cache -> User Cache -> Disable caching for logged-in WordPress users3) In WPRocket the follow selection was made, Never Cache URL(s) -> Specify URLs of pages or posts that should never be cached (one per line) -> /shop/{the shop page works correctly identifying the correct currency but when on product page the currency is USDIf }4) Setup MaxMind Geolocation -> MaxMind Licence Key5) tested [woocs_geo_hello] with https://www.locabrowser.com and found the following results:Canada -> Your country is: United States (US). (defined by woocommerce GeoIP functionality)UK -> Your country is: United Kingdom (UK). (defined by woocommerce GeoIP functionality)USA -> There is no response available.Japan ->Your country is: Japan. (defined by woocommerce GeoIP functionality)6) Tested recommendation of additional code in functions.php, used within Snippet plugin and testeda) {does not help, currently off}<?phpadd_filter("woocs_geobone_ip",function(){return true;});setting:enabled - Run snippet everywherepriority 1b) {does not help, currently off}<?phpif ( isset( $_SERVER['REMOTE_ADDR'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {$_SERVER['HTTP_X_FORWARDED_FOR'] = $_SERVER['REMOTE_ADDR'];}setting:enabled - Run snippet everywherepriority 2Thanks for the help,
Quote from Pablo Borysenco on October 5, 2020, 11:28Hello
a) The plugin has never had this feature.
b) means woocommerce is not correctly finding the user's location. https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me/ It can be if you use - cloudflare - https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation
Your description shows that everything is working correctly
Canada -> Your country is: United States (US). (defined by woocommerce GeoIP functionality) - This can be. The provider may give the IP of the wrong country or the database (locabrowser or MaxMind) outdated
Hello
a) The plugin has never had this feature.
b) means woocommerce is not correctly finding the user's location. https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me/ It can be if you use - cloudflare - https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation
Your description shows that everything is working correctly
Canada -> Your country is: United States (US). (defined by woocommerce GeoIP functionality) - This can be. The provider may give the IP of the wrong country or the database (locabrowser or MaxMind) outdated
Quote from Dan on October 5, 2020, 23:06I have noticed that on Woo Product pages the price loads and shows in default Canadian first for a half-second, then converts to USD.In Cloudflare settings, IP Geolocation is ONIf I enable Development Mode within CloudFlare, turning off caching for my site. All requests will be fetched from my origin server. Should this not correct the problem? I did this test and the problem persists.
Quote from Pablo Borysenco on October 6, 2020, 11:02Hello
Woo Product pages the price loads and shows in default Canadian first for a half-second - this option - https://c2n.me/49kAI8Q.png - redraws prices in ajax mode. This is necessary when the page is cached.
I did this test and the problem persists. - what is the problem? https://c2n.me/49kB1C4.png - My plugin does not affect user location. The plugin uses wooсommerce functionality - https://c2n.me/49kBgst.png
Try to added here - https://c2n.me/49kBl48.png - a shortcode - https://currency-switcher.com/shortcode/woocs_show_current_currency/ and drop me screenshots of your geoIP rules + link to this test page
Hello
Woo Product pages the price loads and shows in default Canadian first for a half-second - this option - https://c2n.me/49kAI8Q.png - redraws prices in ajax mode. This is necessary when the page is cached.
I did this test and the problem persists. - what is the problem? https://c2n.me/49kB1C4.png - My plugin does not affect user location. The plugin uses wooсommerce functionality - https://c2n.me/49kBgst.png
Try to added here - https://c2n.me/49kBl48.png - a shortcode - https://currency-switcher.com/shortcode/woocs_show_current_currency/ and drop me screenshots of your geoIP rules + link to this test page
Quote from Dan on October 6, 2020, 15:34I have set up the following test page: (see Private data for topic)My IP is: (see Private data for topic)The problem is the following, there is a conflict in the following results found on the test page results.Short code [woocs_geo_hello] >> Your country is: United States (US). (defined by woocommerce GeoIP functionality) **this is incorrect!Short code [woocs_show_current_currency] >> Current currency is: CAD **this is correctScreenshot of test page: http://c2n.me/49kU8lK.pngWhen test a woo product page with https://www.locabrowser.com/ I have strange price results for Canada & Hong Kong. Italy, Singapore, United Kingdom are all correct.Canada >> http://c2n.me/49kVMDi.png (Price not displaying correctly)Hong Kong >> http://c2n.me/49kVMYb.png (Price not displaying correctly)Italy >> http://c2n.me/49kVN9S.png (Price OK)Singapore >> http://c2n.me/49kVNw5.png (Price OK)United Kingdom >> http://c2n.me/49kVNOi.png (Price OK)United States >> not workingThank you for your help.
Quote from Pablo Borysenco on October 7, 2020, 09:43Hello
I checked it - https://c2n.me/49lpYfd.mp4 - all works correct
Short code [woocs_geo_hello] >> Your country is: United States (US). (defined by woocommerce GeoIP functionality) **this is incorrect! - Contact woocommerce support and ask why your location is defined as USA
Short code [woocs_show_current_currency] >> Current currency is: CAD **this is correct - Keep in mind that the currency changes according to the rules only for the first visit - Please read this - https://c2n.me/49lr6eL.png
Canada >> http://c2n.me/49kVMDi.png (Price not displaying correctly) - You don't need to worry about it. It looks like this site replaces special characters - https://clip2net.com/s/49lqQcB
Hello
I checked it - https://c2n.me/49lpYfd.mp4 - all works correct
Short code [woocs_geo_hello] >> Your country is: United States (US). (defined by woocommerce GeoIP functionality) **this is incorrect! - Contact woocommerce support and ask why your location is defined as USA
Short code [woocs_show_current_currency] >> Current currency is: CAD **this is correct - Keep in mind that the currency changes according to the rules only for the first visit - Please read this - https://c2n.me/49lr6eL.png
Canada >> http://c2n.me/49kVMDi.png (Price not displaying correctly) - You don't need to worry about it. It looks like this site replaces special characters - https://clip2net.com/s/49lqQcB
Quote from Dan on October 7, 2020, 21:23If I change in WOOCS the setting Currency Storage, from Transient (the current setting), to Session, shouldn't this fix the problem?
Is there a way to clear the Woo IP data cache on my server?
Test the above change with:
The change had no effect and still showed an incorrect country when viewing the test page with my IP and broser.
https://www.locabrowser.com and viewed the test page and the displayed results were correct for all countries.
If I change in WOOCS the setting Currency Storage, from Transient (the current setting), to Session, shouldn't this fix the problem?
Is there a way to clear the Woo IP data cache on my server?
Test the above change with:
The change had no effect and still showed an incorrect country when viewing the test page with my IP and broser.
https://www.locabrowser.com and viewed the test page and the displayed results were correct for all countries.
Quote from Pablo Borysenco on October 8, 2020, 10:30Hello
If I change in WOOCS the setting Currency Storage, from Transient (the current setting), to Session, shouldn't this fix the problem? - Any settings/deleting/customization of my plugin cannot change the fact that your IP is defined as USA.
It's like a mistake in a paper phone book( in your case the MaxMind or woocommerce database ), you cannot correct the mistake in the book using the buttons on your phone.
My plugin just uses the data that's already there! This data is provided by woocommerce(MaxMind). Perhaps their database is outdated - https://c2n.me/49mm6e8.png
To test : Please disable/delete my plugin
and add in functions.php this code:
add_action('wp_head',function(){
$pd = array();
$countries = array();
$text = '';
if (class_exists('WC_Geolocation')) {
$c = new WC_Countries();
$countries = $c->get_countries();
$pd = WC_Geolocation::geolocate_ip();var_dump("Your country is:".$countries[$pd['country']]);
}
});check the text at the top of any page
Hello
If I change in WOOCS the setting Currency Storage, from Transient (the current setting), to Session, shouldn't this fix the problem? - Any settings/deleting/customization of my plugin cannot change the fact that your IP is defined as USA.
It's like a mistake in a paper phone book( in your case the MaxMind or woocommerce database ), you cannot correct the mistake in the book using the buttons on your phone.
My plugin just uses the data that's already there! This data is provided by woocommerce(MaxMind). Perhaps their database is outdated - https://c2n.me/49mm6e8.png
To test : Please disable/delete my plugin
and add in functions.php this code:
add_action('wp_head',function(){
$pd = array();
$countries = array();
$text = '';
if (class_exists('WC_Geolocation')) {
$c = new WC_Countries();
$countries = $c->get_countries();
$pd = WC_Geolocation::geolocate_ip();
var_dump("Your country is:".$countries[$pd['country']]);
}
});
check the text at the top of any page