Posted: May 15, 2015 at 8:48 am
|
Running EE 4.6.23p Until today, I have only required one active payment method: Credit Card (by way of a custom payment method). An upcoming event, however, will accept payment by Electronic Funds Transfer in addition to credit card. It is the lone exception to my organization’s standard practice, thus I can’t simply enable EE’s built-in “Bank” (EE_PMT_Bank) payment method since it will appear on all events. I have written an action handler, appended to my WP theme’s “functions.php” file.
Problem is, that nothing happens. No errors are thrown. Likewise, both credit card and bank payment methods remain visible. I did some rudimentary investigation by adding a filter handler near the payment method selector and dumping the contents each payment object as it was checked and ultimately deactivated: I can confirm that the Suggestions? |
Hi Vincent, this isn’t something that I’m familiar with so I’ve asked a developer for feedback. I’ll update this support post once I have more information. Thanks — |
|
|
Fwiw, my code is derived from a suggestion made in the following thread circa July 2014: https://eventespresso.com/topic/how-can-i-enabledisable-payment-methods-for-different-event-in-ee4/ My code isn’t tied to |
Hi Vincent, It turns out the thread from July 2014 applied to Event Espresso 4.4 or earlier. The payment gateways underwent a re-write for 4.6, so that’s why you no longer see those action hooks. We’re working on adding a new filter (it’s actually been added to a feature branch and is pending review before it can be tested and merged to master). Once it’s been merged to master branch I’ll update this thread and let you know. |
|
|
Tkx Josh. In the meantime, is there a particular core file I can hack a workaround into? The payment method <> certain events filter is a “needed it yesterday” sort of thing for my organization. Near the tail end of “/event-espresso-core-reg/modules/single_page_checkout/templates/payment_options_main.template.php” is an |
Hi Vincent, Instead of hacking a workaround in, you can checkout the FET (Feature) branch that has the new filter from our github repository. Here’s a direct link to that branch: Or you can apply the same commit that Mike made, which is right here: https://github.com/eventespresso/event-espresso-core/commit/777211a7c2761d4f3d26fb134271165a658e3841 The above commit adds a new method and a new filter that can be used to override which payment methods can be selected at checkout. |
|
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: |
|
The support post ‘Disable specific payment method for all but a certain 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.