Posted: May 22, 2017 at 5:46 pm
Hello, We’re trying to set up an event such that when the user buys a particular ticket and doesn’t already have a Paid Memberships Pro level, they get assigned to our ‘Guest’ membership level. I think I’ve come a long way today on figuring out the code to make it work, but we’re clearly not all the way there – it’s not working… Here’s my code – obviously I don’t expect you all to know how to get the PMPro code to work, but I think the issues I’m encountering are actually either calling something wrong on EE4 or with WP Core.
Any help would be appreciated. I’m also going to post this on the PMPro side and will share the forum link here as soon as I do. Thanks. |
|
Here’s the link to the Paid Memberships Pro ticket I just submitted. Thanks. |
|
Hi there, I checked over your code and I’m afraid that Anyhow, I can share some code with you that will help you get the registration object and you can use the kint debugging tool to see which methods are available on the registration object. Example code follows:
Please be sure to install the Kint debugging plugin! |
|
The “get” function I used is my own function declaration. Methods used I got from here: /class-EE_Registration.html Anyway, thanks for the help. I’m going to see if we can get this working. |
|
There’s a lot of problems with the code you’ve posted, is some missing? The main problem is there is no There is So currently your code isn’t even running as its using the wrong hook. There is no
|
|
For the moment, per budget and project scope considerations, we’ve agreed with the client that we’re going to manually assign PMPro membership when the user purchases an event ticket. So we may come back to trying to get this to work later, but turning our attention to other items to check off the list. Points taken and thanks for your help on this. If needed, I’ll open another ticket when necessary. |
|
The support post ‘EE4 – User Buys Ticket ID, Gets Assigned Specific Paid Membership Pro Level’ 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.