Support

Home Forums Event Espresso Premium Conditionally Show/Hide A Particular Payment Method for a Given Event

Conditionally Show/Hide A Particular Payment Method for a Given Event

Posted: May 20, 2015 at 5:05 pm

Viewing 7 reply threads


Dan

May 20, 2015 at 5:05 pm

Hey guys – I’ve been bugging you quite a bit this week, and you’ve been very helpful. One more for you…

Is there a clean way to conditionally show/hide a particular payment method on the checkout pages for a particular event? i.e. only show Invoice as an option when it’s less than 7 days before an event starts? or use a condition checkbox (ACF) to show/hide Paypal Pro.

Is this feasible? We’re in a scenario where we would like to limit the use of credit cards on each of our Events (classes) until they are confirmed. This confirmation would likely be in form of a checkbox yes/no within the admin.

Thoughts?


Josh

  • Support Staff

May 20, 2015 at 5:15 pm

Hi Phil,

Long story short, we’re adding a filter hook to allow this to be done. There’s more info in this other thread:

https://eventespresso.com/topic/disable-specific-payment-method-for-all-but-a-certain-event/#post-157048


Dan

May 21, 2015 at 8:09 am

What fortuitous timing! Sounds like you’re all over it. How close is that feature to being released? I don’t need it “yesterday” (like Vincent), but “tomorrow” would be nice. I’m not sure if I’m confident enough to dig into an early release.

Could you update this thread with an example of how to use the new filter per the scenario above once it is released?

Thanks, Josh.

–Phil


Lorenzo Orlando Caum

  • Support Staff

May 21, 2015 at 10:33 am

Hi Phil, we’ll update this support post once it is ready.

Thanks


Lorenzo


Josh

  • Support Staff

May 27, 2015 at 12:38 pm

Update: The feature branch was merged in and the new filter is included in the latest release (version 4.6.29.p).

Along with that, there’s a very simple initial commit of a payment methods pro add-on that you can install that will allow for enabling specific methods for specific events via setting a meta key/value in the event editor. Here’s a link to the add-on’s github repository:

https://github.com/eventespresso/eea-payment-methods-pro


Dan

May 28, 2015 at 10:04 am

Woohoo! That is so slick. Nice work.

Thanks for the update.


Lorenzo Orlando Caum

  • Support Staff

May 28, 2015 at 10:53 am

Hi Phil, here are the initial docs:

https://eventespresso.com/wiki/payment-methods-pro-add-on/

Were you able to get it setup?

Note: it does require the latest version of Event Espresso 4.


Lorenzo


Dan

May 28, 2015 at 11:03 am

I was able to set it up!

My setup requires this on/off feature for only one payment method. I used an existing ACF field group (specific for espresso_events CPT) and added the include_payment_method key as a Radio select setting the Admin only name of the payment method in question as a value labeled Yes and a null value labeled No.

ACF – https://drive.google.com/open?id=0ByOfss3eDI2aSGJwRDR0RFlfV0k&authuser=0
Metabox on CPT edit screen – https://drive.google.com/open?id=0ByOfss3eDI2aNDRva2VOdzVtS2M&authuser=0

Works like a charm.

Viewing 7 reply threads

The support post ‘Conditionally Show/Hide A Particular Payment Method for a Given Event’ 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.

Event Espresso