Support » Plugin: Price Based on Country for WooCommerce » Can only set zones for ‘sell to’ countries, not ‘ship to’ countries

  • Resolved chrislhow

    (@chrislhow)


    Hi!

    If I set the option “Price Based On” to “Customer shipping country”, I can still only set up Pricing Zones for countries in the WC “Sell to specific countries” list.

    As an example, I only sell in EU countries, but ship to every country in the world, and my prices are based on the shipping country, not the location of the customer who is buying. I can’t set up Zone Pricing for any country not in the EU, because they don’t show in the list.

    In WCPBC_Pricing_Zones::get_allowed_countries() there is a call to WC()->countries->get_allowed_countries(), which returns a list of the countries in the WC “Sell to specific countries” list.

    Surely if “Price Based On” is “Customer shipping country” this should be to WC()->countries->get_shipping_countries() ?

    Is there anywhere I can put this together in a pull request, or help some other way?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi,
    Thanks for the feedback. You can solve the issue by adding the following code snippet:

    add_filter( 'wc_price_based_country_allow_all_countries', '__return_true' );

    Thread Starter chrislhow

    (@chrislhow)

    Thank you, that indeed solves the problem! 🙌

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can only set zones for ‘sell to’ countries, not ‘ship to’ countries’ is closed to new replies.