Posted: April 13, 2020 at 2:16 pm
Hi, we need to open some virtual courses rather than the in-person ones for a short time. Is there a way to stop payments if they are out of Canada? We would like to limit it so only people in Canada can register. It would be ok if they registered but if they are from another country they should be taking the course through that country instead. Ideally we’d like anyone out of country to be able to register but not pay and notify us so we can communicate directly about it. (The prices are cheaper for the Canadian courses so people from out of country may want to sign up here but they should be using the one from their own country if available). If this is not currently possible, is there someone we could hire to write the code to set it up? Thanks for your help! |
|
Hi, This may be possible. May I ask which payment method(s) does your site use to collect payments? At a minimum though, the Payment Information step could be customized to include instructions to use an Invoice payment option if their billing address is outside of Canada. |
|
Hi again, we’re currently using Stripe. This is basically meant to stop people from paying so we can recommend they go through their own country’s site. It’s cheaper in Canadian funds so they may try just to save money. They can take our course, but we’d then need to pay a fee to the other country so we’re trying to minimize that and identify anyone who isn’t in-country. thanks! |
|
What you could do is set up the Stripe gateway to require the billing address, then add some code so “Canada” is the only option for the Country field. This way only those that have a billing address in Canada can complete the credit card payment form. Here’s how to do that: https://gist.github.com/joshfeck/caaacef4587ba906ec414f6f2120f634 You can add the code to a functions plugin. If you have other events where it will be allowed for everyone to pay, you can set up payment methods for specific events by using the Payment Methods Pro add-on. In this case, you could set up a separate payment method (also using Stripe) which can be specifically set for other events. |
|
Hi there, thanks so much for this info! Unfortunately I’m a designer, not a coder, so I don’t know how to add code to a functions plugin. Do you mean I’d make a child theme and add this to functions.php? I don’t know how to do hooks and that sort of thing. We are wondering if we could hire you or someone you could recommend to set this up for us and what would be the cost. thanks so much! |
|
We’ve put together a step by step guide that explains how to make a functions plugin: Adding code to a functions plugin is much like to adding code to a theme’s functions.php file. If you’ve added code to a theme’s functions.php file before, you’ll find the process to be similar. There are a few reasons why we recommend adding the code to a plugin though: If you prefer that Event Espresso staff copy and paste code into a file on your server we can do that if you purchase a priority support token. |
|
OK, thank you. I have added the code, created the plugin and got it working. However, we need to have this only happen on certain courses. So I need to be able to do turn off that Canada limitation code. I’ve installed the Payment Methods Pro addon but it says it was deactivated because Multi Event Registration was also active, and the two are incompatible. If I did turn off the multi-event registration, can you tell me the process I would need to follow to have some events use this new Canada limitation (site-specific plugin code) and some not? Also, does the Payments pro Addon do similar things as the multi-event Addon, I assume we will need to do without that functionality to have this one? Thanks so much for your excellent help so far. |
|
The Payment methods pro add-on makes it possible to set up specific payment methods for a specific event. Since the Multi Event Registration add-on makes it possible for two or more different events to be added to the cart, where each event could have a different payment method, the MER add-on cannot be used alongside Payment Methods Pro. Here’s how you can set up a second Stripe payment method and use that payment method for the events with the Canada limitation: 1) You’ll activate the Payment Methods Pro add-on |
|
Nice! That sounds good, I’ll try that tomorrow. Another question – I found out that we need to charge taxes based on the customer’s location (province within Canada). There are several different PSTs being charged in different provinces, although where we live in Alberta there is only GST. How can I do that during the transaction? thanks again, you’ve been great! |
|
Hi, sorry for the extra question but it pertains to my last one and I just want to check before I install – will a tax calculation service like quaderno or Taxjar work with EE? thanks again. |
|
Hi, Quaderno or Taxjar work with WooCommerce/Easy Digital Downloads. I’m not aware of any add-ons for EE. This is something you can add to your site specific plugin though. Here’s the code: https://gist.github.com/joshfeck/bc4ffb1d4417258fce3ce32e00d25ea8 |
|
Oh cool! So we’re good for Canada then, for the moment, thank you (we’re trying to get these events live & available today). What would you recommend we use to sell worldwide and still collect the necessary taxes? Normally the courses are in-person but with the Coronavirus everything is moving to virtual so there must be lots of people needing to do this now. |
|
Hi again, we’ve found out that she doesn’t need to charge taxes if teaching virtually in person rather than having an automated course, so we’re OK without this functionality for the time being. I’ll keep this code for other offerings, though. If you do have an addon or system for how to do that later on, I’d love to know about it. Thanks so much for your help, you’ve been excellent. |
|
The support post ‘how to limit payment by country but still register’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.