Support

Home Forums Event Espresso Premium Payment Pro Method

Payment Pro Method

Posted: January 9, 2025 at 12:06 pm

Viewing 3 reply threads


Vals

January 9, 2025 at 12:06 pm

We sell courses/events for Canada and US. We have different PayPal business accounts for each country. Question is: if I have one event can I attach 2 PayPal accounts to ONE event? So that the money is routed to the correct country/PayPal. Thank you in advance.


Garth

  • Support Staff

January 13, 2025 at 11:33 am

Hi Vals,

When someone registers, you have to configure Event Espresso to decide which payment gateway account for people to pay.

By default Event Espresso uses the default payment accounts you have set up in Event Espresso > Payment Methods.

The Payment Methods Pro add-on allows you to choose a payment method to be used for an individual account if different than the default settings.

It seems this idea is incomplete. You have to pre-determine which payment account for attendees to pay. In the case that you had two different payment options available for one account, how the system know which account to pay?


Vals

January 14, 2025 at 8:29 pm

Thanks so much Garth! I believe our web developers can use code to determine which account registrants will send funds to: by asking registrants whether they are from Canada, from the US, or other country. The code sends them to the right email/payment set up. Sound right?


Garth

  • Support Staff

January 16, 2025 at 3:00 pm

That might work. Here are my recommendations for modifying Event Espresso Core:

1. Use WordPress Hooks and Filters

Event Espresso is built with extensibility in mind. Utilize the available WordPress action hooks and filters to add or modify functionality without altering the core files. This ensures compatibility with updates and reduces the risk of breaking existing features.

All actions are prefixed with either AHEE__ (Action Hook Event Espresso) or FHEE__ (Filter Hook Event Espresso) so if you search for either of those strings in a text editor/IDE you’ll find all of our hooks.

If you looking to record a purchase only when its paid you’ll likely want to use a hook on the thank you page, for example:

AHEE__thank_you_page_overview_template__top
AHEE__thank_you_page_overview_template__content
AHEE__thank_you_page_overview_template__bottom

Each of those action hooks is passed the EE_Transaction object which you can use to confirm if payment has been made, there are some details here:

https://github.com/eventespresso/event-espresso-core/blob/master/docs/T–Tutorials/customizing-the-ee-thank-you-page.md

Your team can also request additional hooks if necessary.

2. Leverage Add-ons or Custom Plugins
If your customization requires significant changes, consider creating a custom plugin or leveraging existing Event Espresso add-ons. This approach isolates your changes from the core, making them easier to maintain and update.

3. Follow Coding Standards
Adhere to WordPress coding standards and Event Espresso’s development guidelines. Consistent coding practices improve maintainability and reduce conflicts.

4. Document Your Changes
Maintain clear documentation of all customizations, including the purpose, functionality, and code snippets. This helps ensure future developers understand and maintain your changes effectively.

5. Test in Staging Environments
Before applying customizations to a live site, thoroughly test them in a staging environment. Ensure they are compatible with the latest version of WordPress, Event Espresso, and any third-party plugins or themes in use.

6. Avoid Hardcoding
Use dynamic references instead of hardcoded values whenever possible. For example, reference database options or settings via WordPress APIs to adapt to future updates or changes.

7. Contribute to Event Espresso Development
If your customization could benefit other users, consider contributing your changes to the Event Espresso project by submitting a pull request on Github.

8. Monitor Updates and Release Notes
Keep track of Event Espresso’s updates and release notes to identify potential conflicts with your customizations. This allows you to address compatibility issues proactively.

9. Use Version Control
Implement version control systems (e.g., Git) for tracking changes to your customizations. This makes it easier to roll back changes if an update causes conflicts.

Does that help?

Viewing 3 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso