• Here’s a video that demonstrates all this configuration and behavior:
    https://drive.google.com/file/d/1m4ABDqVgL_WmefSfjr9oPrL1tfy6OJB_/view?usp=sharing

    Using the free version.

    WooCommerce -> Settings -> Default customer location is set to “Geocode”. The sell to countries are USA and Canada for now.

    I have configured a MaxMind API Key for geocoding.

    WooCommerce – Country Restrictions configured with “Catalog Visible (non purchasable)” selected and a slightly customized “Product restriction message”.

    All but a handful of our products are setup as “Product available for selected countries” and the United States is the only country added. A few also have Canada Added.

    The video shows this “US only” setup for a product called the Flat-Jack.

    When I browse in a Chrome Incognito window to the store and look at the Flat-Jack detail page there is no “Product restriction message” indicating that I can’t purchase this product outside the USA.

    When I add the product to my cart and specify a British Columbia, Canada shipping location the product remains in my cart despite being a “USA only” product in the settings.

    When I proceed to the checkout, same.

    However, if I leave the cart/checkout and visit the the product page again, I get a message that the product has been removed from my cart because I can no longer purchase it but it does not indicate a country restriction or use the “Product restriction message” which would be awfully confusing to users.

    Also, if I use a VPN to replicate being outside the USA, I do not see the “Product restriction message” on product detail pages configured to be sold only in the USA.

    What can be done to get this to work properly:
    1) indicate that the product is not available (use the “Product restriction message”) when loading a product detail page for a product configured to be USA only.
    2) remove the product with a relevant message when someone chooses a country as their shipping address in the cart or checkout page that is not allowed on the product.

    Thanks!

  • The topic ‘Strange Behavior’ is closed to new replies.