Posted: January 20, 2021 at 10:29 pm
Hi there We are using EE4. It is possible to register for an event with or without a member account. There is currently no special plugin for the user account, it is solved via WP-User. But now we would like to realise a professional member area with the plugin Memberpress. We choose this plugin, because on the following link it is written, that it is possible to connect EventEspresso with Memberpress. See https://eventespresso.com/product/eea-wp-user-integration/ Our goal is, that the logged in user (user with an account on our website) should be able to see or edit in the dashboard of Memberpress the following details: A) My booked events (orders) = all registrations made by the user via EventEspresso B) My user profile & addresses (participant address & billing address) = The user should be able to view and edit his personal data and addresses (participant address, billing address). These fields should be the same as EventEspresso input fields. C) My invoices = The user should be able to view his receipts/invoices of the events. How is it possible to realise it with EE4 to integrate/connect it with the plugin Memberpress? Because the information on your website is not sufficient. Thank you for your help. Best regards |
|
Hi there, Whilst the WP User Integration add-on does allow membership plugins to ‘connect’ and work with it, that’s a little different from a full integration using the membership functions within those plugins (we don’t fully integrate with any membership plugins to allow you to have the choice of what you want to use). Some of what you are asking to do can be done, but some will require custom development.
This can be done using the https://eventespresso.com/wiki/wp-user-integration/#ee4-my-events You’d add the above shortcode on the page you are using for membership details. However, note that the above features show registrations made on events using the contact details that match the user account details, it does not show all registrations made by a specific account if they are changing contact details on the registration form.
This is the part that requires custom development, we don’t sync details with any membership plugins so whilst it’s possible to do, it will need custom development to pull the values from your membership plugin.
The ESPRESSO_MY_EVENTS output mentioned above gives the user access to their invoices/receipts. |
|
Hi Tony Thank you for your help. |
|
We have some documentation on our model system (which allows you to pull pretty much any data you would need) here: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System
We don’t have any code your developer can use for this as it’s not something we provide out of the box, they will need to write their own code which hooks into Event Espresso to update the account. The function that updates the user profile is If you look within that function you’ll find 2 actions you can use to update the user:
Is fired when a new user is generated and allows you to update more information that EE does by default.
Is fired every time that above function is called and allows you to update additional details. If you take a look within |
|
This reply has been marked as private. | |
Yes, it is a POST request sent via ajax and is handled by the Single Page CheckOut (SPCO for short).
Sorry, but which value name? If you are looking to hook into the attendee information processing, take a look at the You can pull all of the information you’ll need from that using our model system from above. |
|
This reply has been marked as private. | |
Just to clarify, I didn’t say the fields weren’t included in the request, they are. Are you looking to sync Event Espresso registration details TO Memberpress, or are you looking to pull the details FROM Memberpress into the EE registration questions on checkout? Or Both? The reason I recommend you look into how https://gist.github.com/Pebblo/0b3b28c9d0c52d5425fa167da1f1a622 However, due to the fact that people can set up their registrations to work in many different ways, there’s a fair bit more involved that way. Lines 12-16 show how I pull in the question groups related to the primary registrant from SPCO itself. If you are using the WP User Integration add-on (which you will be if you are creating a ‘My Events’ section to output their registrations) then each time a registration is made then For example if you hook into That hook is passed $user, $attendee, $registration. $user being the WP_User account EEE found and updated. You can pull address details from the $attendee:
For custom questions you can pull the answers from the registration:
Does that help? If you haven’t read over the docs for the model system I highly recommend you do: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System |
|
This reply has been marked as private. | |
Hi Markus, I’ve mentioned multiple hooks above so I’ll need to see the code they are using. Whilst it is possible to include in the forum (you can host the file on your site and include a link on your reply) if you prefer to do this via email thats also fine. You can use support[at]eventespresso.com, please include a reference to this thread within the opening email. |
|
This reply has been marked as private. | |
Ok, the method I referenced above has 2 hooks and if you take a look at my reply HERE there is a reference to this hook:
Further on I gave an example of using this hook:
The clue here is indeed in the name of the hook, the hook ending EE action hooks are in the format “AHEE__{FullyQualifiedClassName}__{MethodName}__{location within method}”, see HERE. Your developer has chosen to use The code for these actions can be found HERE. |
|
This reply has been marked as private. | |
That’s actually nothing to do with Event Espresso, it’s your server setup that controls what is logged and not Event Espresso. PHP errors would be logged in your error log, the content and location depend on how the server is set up.
Whilst I don’t have a problem taking a look over a snippet it’s important to note that we don’t provide support for other peoples code, nor will we write that custom code for them. The snippet is incorrect and is using actions without specifying the number of arguments to pass, meaning it uses the default of 1. That is likely why the above error is being thrown as it means the method does not have access to the $attendee or $registration variables declared within that method. “This registration step could not be completed. Please refresh the page and try again.” is essentially a “catch all” for when EE hasn’t passed an error from within itself, but something failed. 99% of the time it means there is a fatal error being thrown by whatever PHP code is running at that time which halted the script. Your developer needs to review how they are adding the actions (see HERE), its important to note values for priority and accepted_args when adding the action(s).
EE4-AJAX requests are just another request to the server, they log errors in whatever way your server is set to do so. There are many ways to log what is happening on the request but I’ll give you an example of one I use. In
Which tells your server NOT to display the errors, but to log them, WordPress sets it’s own location when using just the above which is Also, when you are on the checkout page, if you open up Chrome Dev Tools and watch the ‘Network’ tab, when you click the submit button you can view the request sent and see the headers. So if that request is throwing error 500, you’ll see it in the tab. |
|
The support post ‘EE4 connect and integrate in Memberpress’ 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.