• Resolved lysasletters

    (@lysasletters)


    My site uses Paypal Express to take payments, and I wanted to find a way to restrict the ability for people to pay for items in my WooCommerce store if they are in the state of MS for now, for sales tax reasons. Is there a way to restrict payment, like when they put their address in something could say “not accepting orders from this state currently” or somehow stop them?
    I have a snippet of code already working to restrict them being able to put in that state when estimating shipping, however I found when testing it with the Paypal, it was able to pull the address from Paypal and input it (though not the state). I’d like people to be able to be alerted earlier in the process that MS residents currently can only buy from my physical locations (consignment shop and flea market to be specific.)
    Thank you for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Go to WooCommerce > Settings, then select ‘Shipping’ tab > Zones.

    Create the Zone you want to ship to by typing in there ‘United States’ and you should see a drop down of all the states. You leave out the one you don’t want to sell to. Maybe in the WooCommerce setting you can just Restrict the State you don’t want to sell to.

    Hope this helps. Give it a try it.

    Thread Starter lysasletters

    (@lysasletters)

    Thank you for answering, I had tried this first but it unfortunately did not restrict it.

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    This would need a bit of custom code to make this happen, so I am going to leave this open for a bit to see if someone is able to provide that. We highly recommend contacting one of the services on our Customizations page (https://woocommerce.com/customizations/)

    Hopefully that helps! Have a great one!

    Did you only choose the States? and leave out the country ‘United States’ in the zone?
    Also under the General Tab of WooCommerce make sure you set the shipping there properly. Not sure if you can choose just the states, or you have to choose the country.

    It might be the setting.

    If not and you want to try using a plugin:

    https://woocommerce.com/products/conditional-shipping-and-payments/

    I use it and it works perfect for my more complicated restrictions I need. But I think you can easily setup the restrictions you want there with WooCommerce and not have to spend money on a plugin or go through some coding.

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    The plugin would not restrict only one state for a payment gateway, it would only work on a “per country” basis. This would need to be customized.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Restrict payments by state’ is closed to new replies.