Cache Issues with Dynamic Pricing / Kinsta & WP Rocket
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 doblezzeta on October 20, 2020, 21:22Hello Team,
I hope you are doing well.
Currently I am having some issues with the plugin on v 2.3.2. I am using the shortcode [woocs_show_custom_price value=47] to display Dynamic Pricing on my landing page for my international customers.
For some reason it is not displaying correctly to customers, and they are getting mixed currencies (example European customers getting Mexican Pesos in Landing Page). At the moment I have spoken with Kinsta (my hosting) to exclude the specific landing page from caching until this is solved. The problem is that WOOCS is generating a crazy amount of php requests due to the amount of visits, we are particularly getting many requests for WOOCS_STORAGE::__construct
What can I do? Which settings would you recommend? I am using Wordpress + Kinsta + WP Rocket (it works together with Kinsta). I really want to use this plugin for the landing page, but caching is becoming a must.
I hope you can help me out, the support has always been top notch!
Thank you,
Gian
Note: I am the one that suggested the new shortcode on codecanyon about dynamic pricing depending on Product Rules. Looking forward to using it! It might even solve this issue!
Hello Team,
I hope you are doing well.
Currently I am having some issues with the plugin on v 2.3.2. I am using the shortcode [woocs_show_custom_price value=47] to display Dynamic Pricing on my landing page for my international customers.
For some reason it is not displaying correctly to customers, and they are getting mixed currencies (example European customers getting Mexican Pesos in Landing Page). At the moment I have spoken with Kinsta (my hosting) to exclude the specific landing page from caching until this is solved. The problem is that WOOCS is generating a crazy amount of php requests due to the amount of visits, we are particularly getting many requests for WOOCS_STORAGE::__construct
What can I do? Which settings would you recommend? I am using Wordpress + Kinsta + WP Rocket (it works together with Kinsta). I really want to use this plugin for the landing page, but caching is becoming a must.
I hope you can help me out, the support has always been top notch!
Thank you,
Gian
Note: I am the one that suggested the new shortcode on codecanyon about dynamic pricing depending on Product Rules. Looking forward to using it! It might even solve this issue!
Quote from Pablo Borysenco on October 21, 2020, 12:26Hello Gian
a crazy amount of php requests - it can not be so. The plugin makes 3-4 questions for each visitor. This is necessary so that the currency is stored for each user. And it doesn't really depend on which shortcode you are using.
. Looking forward to using it! - I can give you a pre-release version
Hello Gian
a crazy amount of php requests - it can not be so. The plugin makes 3-4 questions for each visitor. This is necessary so that the currency is stored for each user. And it doesn't really depend on which shortcode you are using.
. Looking forward to using it! - I can give you a pre-release version
Quote from doblezzeta on October 21, 2020, 14:22Hello Pablo,
Thanks for answering. Yes it seems like the issue was due to caching.
Is there any way to add ?currency=$$$ at the end of the url automatically depending on where the visitor comes from? Looking for a way to force the customers local currency and avoid any issues.
Currently for every 10 customers there are 3 that get the wrong currency. I know because I have HotJat installed recording the website, so for example COP get CRC, but other from COP get COP. So not sure what this inconsistency might be caused by.
Any ideas?
By the way, yes please send me the pre-release, would love to test it!
Hello Pablo,
Thanks for answering. Yes it seems like the issue was due to caching.
Is there any way to add ?currency=$$$ at the end of the url automatically depending on where the visitor comes from? Looking for a way to force the customers local currency and avoid any issues.
Currently for every 10 customers there are 3 that get the wrong currency. I know because I have HotJat installed recording the website, so for example COP get CRC, but other from COP get COP. So not sure what this inconsistency might be caused by.
Any ideas?
By the way, yes please send me the pre-release, would love to test it!
Quote from Pablo Borysenco on October 22, 2020, 09:58Hello
Read this please - https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me/
AND - https://currency-switcher.com/function/woocs-get_currency_by_country/
to set the currency for the user (the user cannot change the currency) add code in functions.php
add_filter('wp_head',function(){if(class_exists('WOOCS')){global $WOOCS;//$customer_country = 'ES';$customer_country = $this->storage->get_val('woocs_user_country')$currency = $WOOCS->get_currency_by_country($customer_country);$WOOCS->set_currency($currency);}});
Hello
Read this please - https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me/
AND - https://currency-switcher.com/function/woocs-get_currency_by_country/
to set the currency for the user (the user cannot change the currency) add code in functions.php
Quote from Pablo Borysenco on October 22, 2020, 10:17yes please send me the pre-release, would love to test it! - in private data
yes please send me the pre-release, would love to test it! - in private data
Quote from doblezzeta on October 23, 2020, 19:15Great I will test it today
What is the shortcode structure to call the product prices by country?
Great I will test it today
What is the shortcode structure to call the product prices by country?
Quote from doblezzeta on October 23, 2020, 19:20After trying to paste the function into function.php I got this
Don't Panic
The code snippet you are trying to save produced a fatal error on line 68:
is_readable(): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/www/mp1notlive_603/public:/www/mp1notlive_603/mysqleditor:/www/mp1notlive_603/web:/www/mp1notlive_603/deploy:/www/mp1notlive_603/deployment:/www/mp1notlive_603/deployments:/usr/share:/tmp)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
After trying to paste the function into function.php I got this
Don't Panic
The code snippet you are trying to save produced a fatal error on line 68:
is_readable(): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/www/mp1notlive_603/public:/www/mp1notlive_603/mysqleditor:/www/mp1notlive_603/web:/www/mp1notlive_603/deploy:/www/mp1notlive_603/deployment:/www/mp1notlive_603/deployments:/usr/share:/tmp)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
Quote from Pablo Borysenco on October 26, 2020, 11:05Hello
Please add a symbol ";" - https://c2n.me/49zF3Y6.png
[woocs_price id=425 ] - attribute id - it's ID of the product
Hello
Please add a symbol";" - https://c2n.me/49zF3Y6.png
[woocs_price id=425 ] - attribute id - it's ID of the product
Quote from doblezzeta on October 26, 2020, 11:33Hello Pablo,
Thanks, now the PHP Snippet works well after addding the ";"
Now...regarding the WOOCS new prelease to use the new shortcode, after updating the plugin I got a critical error on the staging site and now is down. Not sure what it could be.
Is there a newer version after 22-10-20?
Hello Pablo,
Thanks, now the PHP Snippet works well after addding the";"
Now...regarding the WOOCS new prelease to use the new shortcode, after updating the plugin I got a critical error on the staging site and now is down. Not sure what it could be.
Is there a newer version after 22-10-20?
Quote from Pablo Borysenco on October 26, 2020, 12:09I added link in private data
If no luck:
please add FTP+wp-admin access to your test site - https://c2n.me/43SC6rb.png -> https://c2n.me/42BAoj4.png
I added link in private data
If no luck:
please add FTP+wp-admin access to your test site - https://c2n.me/43SC6rb.png -> https://c2n.me/42BAoj4.png
Quote from doblezzeta on October 26, 2020, 12:19Hello Pablo,
Just updated to that version and it still happened. So what I did was the following
- Deactivated WOOCS from FTP
- Website now was working
- Turned OFF the PHP Snippet that was given recently
- Turned on WOOCS
- Now it worked
Problem comes when I put back the PHP Snippet. For some reason it is causing some sort of interference with new version of WOOCS
Hello Pablo,
Just updated to that version and it still happened. So what I did was the following
- Deactivated WOOCS from FTP
- Website now was working
- Turned OFF the PHP Snippet that was given recently
- Turned on WOOCS
- Now it worked
Problem comes when I put back the PHP Snippet. For some reason it is causing some sort of interference with new version of WOOCS
Quote from Pablo Borysenco on October 27, 2020, 10:32Hello
Ok! Try this code:
add_filter('wp_head',function(){if(class_exists('WOOCS')){global $WOOCS;$customer_country = $WOOCS->storage->get_val('woocs_user_country');$currency = $WOOCS->get_currency_by_country($customer_country);$WOOCS->set_currency($currency);}});
Hello
Ok! Try this code: