Title: Plugin doesn&#039;t work &#8211; receive error
Last modified: August 22, 2016

---

# Plugin doesn't work – receive error

 *  [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/)
 * When I go to the product details it shows:
 * Price Based on Country
 * Warning: Invalid argument supplied for foreach() in /home/mymuktav/public_html/
   wp-content/plugins/woocommerce-product-price-based-on-countries/includes/class-
   wcpbc-admin.php on line 81
 * Please advise.
 * Thanks
 * [https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/](https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/)

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

 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838579)
 * Hi! Have you added at least one group of countries?
 *  Thread Starter [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838621)
 * Thanks. My fault for not checking the instructions. However, it would be better
   if you displayed a message such as ‘Please enter details in the woocommerce ‘
   Price based on Country’ tab, rather than showing a code error.
 * I have another issue. I have set my product price for the UK and US. When I use
   geopeeker.com the price being displayed in the US is the UK price in pounds. 
   It isn’t showing the correct US price in dollars. Any ideass why this is? Is 
   there another tool I can use to see how customers in the US are seeing the product
   web page?
 * Thanks
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838741)
 * Thanks you for tour feedback, this bug will be fixed in the next update.
    You
   have two ways to test how customers see the products prices: If you are in a 
   test enviroment, you can configure the debug mode in the setting page otherwise
   you can use a proxy navigation tool, for example [hola](https://www.google.es/url?sa=t&source=web&rct=j&ei=ierwVPWIIsG6UZOJgKgL&url=https://chrome.google.com/webstore/detail/hola-better-internet/gkojfkhlekighikafcpjkiklfbnlmeio%3Fhl%3Des&ved=0CB8QFjAA&usg=AFQjCNHQDnAkpqwk0RJOG4wPilhPy9a35A&sig2=b1f0KEGxTmnx-oBGk4LbAA)
 *  Thread Starter [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838838)
 * I installed the hola plugin and browsed from the USA. The problem is when I arrive
   at the product page it is showing the English price in pounds. After adding the
   product to the basket, it then does show the correct price in US dollars. Why
   isn’t it showing the correct price in dollars immediately? How do I resolve this?
 * Note, when I browse from within the UK, I immediately see the UK price set by
   your plugin and not the default regular price of woo commerce. Why, therefore
   is it not doing this for the USA?
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838840)
 * What version of WooCommerce are you using?
    You might send me the url of your
   store to see the problem? Thanks.
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838843)
 * Try to do test in a anonymous window to prevent use stored session data and be
   sure that the check “debug mode” is disable.
 *  Thread Starter [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838848)
 * I’m using WooCommerce version Version 2.3.5
    url is [https://www.wonderofherbs.com/product/amla/](https://www.wonderofherbs.com/product/amla/)
 * I have set the prices as follows:
    woocommerce – £9.99 your plugin UK – £14.99
   US – $19.99
 * The following error is shown at the top of the page when using hola to browse
   from the US.
 * Warning: Invalid argument supplied for foreach() in /home/mymuktav/public_html/
   wp-content/plugins/woocommerce-product-price-based-on-countries/includes/class-
   wcpbc-customer.php on line 86
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838850)
 * This error occurs when you haven’t added groups of countries but is strange that
   only occurs in only one product.
 * Have you installed another plugin that modifies the price or currency?
 * What is your configuración on “Default Customer Address”?
 *  Thread Starter [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838858)
 * W3 total cache plugin is causing the issue. When disabled, your plugin works 
   fine.
 * Turning on w3 cache, I have to disable the following in order for your plugin
   to work.
    page cache object cache browser cache
 * I don’t know if this helps, but if I disable only page cache and object cache
   your plugin works, but it takes about 10 seconds and then a page refresh to change
   to the correct price/currency, whereas disabling browser cache as well will instantly
   change to show the correct currency (using the hula plugin).
 * Disabling all these options in W3 renders the caching useless.
 * Any ideas?
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838860)
 * I assume you added a _wc_session_ to ignore query stems in database cache options.
   if you have’nt done it, you must do it.
 * You can add _oga_wppbc_ to ignore query stems also.
 * I detect that your widget cart no works fine, if you add a item and then you 
   navigate to other product the widget shows 0 items.
 * Probably you had to check w3 settings to ensure Woocommerce integration.
 *  Thread Starter [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838862)
 * I have always had database caching disabled.
    In the database cache options under‘
   ignored query stems:’ I have the following listed.
 * gdsr_
    wp_rg_ _wp_session_ _wc_session_
 * These have always been there. I have not added or removed any details.
 * I enabled the database cache, then removed the _wp_session_. However this did
   not resolve the issue. I then tried adding _oga_wppbc_ but this didn’t resolve
   the issue either.
 * I have now disabled the database cache again. I am making sure I clear the cache
   every time I make a modification to W3TC settings.
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838863)
 * If you use W3 Total Cache, your server may be serving your visitors stale pages,
   in such case, the geolocation method is not invoked, thus it seems like plugin
   doesn’t work properly.
 * The solution is to disable page caching for product details pages to stay dynamic
   and display information specific to the current customer.
 *  [tuslibros](https://wordpress.org/support/users/tuslibros/)
 * (@tuslibros)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838865)
 * Oscrgare, can you please tell me how to delete this plugin from my wp installation?
   
   I tried to activate the plugin but it wouldn’t, so I figured, why to have it,
   I need to uninstall and I get this message anytime I try to do so: Fatal error:
   Call to undefined function p_upload_dir() in /home3/ulises/public_html/skype-
   clases/wp-content/plugins/woocommerce-product-price-based-on-countries/uninstall.
   php on line 25 If you can help, I would highly appreciate it.
 *  Plugin Author [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838866)
 * Hi tuslibros!I made a mistake when typing the code uninstall file.
    Please go
   to uninstall.php file and replace p_upload_dir() by wp_upload_dir()
 *  Thread Starter [treemac](https://wordpress.org/support/users/treemac/)
 * (@treemac)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838874)
 * This plugin does not work with W3 Total cache, WP Super Cache, or my host’s dynamic
   cache. It seems that dynamic caching is what’s causing the problem. With caching
   plugins being so important to a great many users isn’t there a workaround you
   can implement? Yes, the product pages can be isolated from the cache software
   but this defeats the purpose of caching. I have done this and the page speed 
   reduces by a significant amount.
 * Thanks

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

The topic ‘Plugin doesn't work – receive error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-product-price-based-on-countries/assets/icon-
   256x256.png?rev=1976858)
 * [Price Based on Country for WooCommerce](https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/reviews/)

 * 15 replies
 * 3 participants
 * Last reply from: [treemac](https://wordpress.org/support/users/treemac/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-receive-error/#post-5838874)
 * Status: not resolved