Posted: August 27, 2020 at 12:30 am
We recently imported records into our site, including some who had only made a partial payment. Those contacts who had only partial payments made when they were imported have tried to go back and make an additional payment, and they are thrown into an inifinite loop of trying to register, then from the registration confirmation it shows a link to “View Payment Options”. When clicking that link, they are then sent back to the first page (registration confirmation). New registrations who make a partial payment (custom plugin) do not have this issue. The link for new users who make a partial payment has the syntax “&step=payment_options” when they choose “Make a Payment” from their Registrations screen. The link for those who were imported shows “&step=attendee_information”. Is there a way this can be fixed? |
|
Hi there, I’d like to reproduce this, may I ask how the users are returning to make an additional payment? |
|
Sure! I’ve created an Account page for users (added via the WPUser Add-on) which uses the [ESPRESSO_MY_EVENTS] shortcode. There is a link from there, the cart icon highlighted in red on the second screenshot, that is listed as “Make a Payment”. That link works for non-imported registrants, but doesn’t work for imported registrants. https://ibb.co/n19LyBg I could also send credentials to a staging site that you can see the issue on, if that would help. |
|
Just curios if you’ve been able to reproduce the issue or want access to the staging site? |
|
Hi there, Yes, I’ve managed to reproduce this and the ’cause’ is the Wait List add-on, although what that add-on is doing is expected and we’ll need to make a change to the importer add-on to prevent this. In short, the waitlist add-on is checking if the ‘attendee_information’ step has been completed on the registration (for normal registration it has, for imported registrations it has not) and then filtering that link as it thinks the registration is a waitlist registration. Fixing the importer won’t fix your current registrations but de-activating the waitlist add-on will allow them to work for now. I’m investigating a fix that will work for your current registrations and post more shortly. |
|
Ok, great, thank you very much! |
|
Ok, so this wont cover every use case but it should fix the above for you. Add this snippet to the site: https://gist.github.com/Pebblo/ac982be6bcac8b41c5ed7f6ff88a264c You can add that to a custom functions plugin and we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ That snippet hooks in after the waitlist does, pulls the transaction for the registration in question, checks if the attendee_information step is incomplete and then also checks if there is a payment related to the transaction. If both are true it switches the query args for the URL back to the default which should allow both your registrations and waitlist registration to continue to work as expected. We’ll be adding a fix to the importer add-on which is basically just toggling the attendee_information step to true for any imported registrations. |
|
Great, thanks for this! I applied it to the site and it’s looking good, except for one particular event. I’m not sure why this particular event is not working, but every time I try to make a payment using an imported account for that event, I get a “There has been a Critical Error on your WordPress site” message. The link looks the same as the link that’s generated for events that have registrations imported and are working to make an additional payment. |
|
Check your servers error logs, the above message would normally mean an error is logged. Post that here, please. |
|
Yep, I found it- unfortunately, it looks like it’s a conflict with our custom plugin, which I assume you probably can’t help with. If you can, great! If not, then I’ll go to the plugin creators. [02-Sep-2020 17:24:54 UTC] PHP Fatal error: Uncaught Error: Call to a member function price() on null in /www/wp-content/plugins/partial-payment-for-event-espresso/includes/process-partial-payment-ee-class.php:135 |
|
Officially we don’t provide support for custom code, but if you can add the code in question to PasteBin or send the plugin to support[at]eventespresso.com I’ll take a look. If it’s something deep within your custom code it’s unlikely to be something we can help with but if I can spot something that will prevent the fatal I’ll happily pass that on. |
|
Thanks! I’ve forwarded the code to support@ with the subject line Somatic Practice – Imported Records with partial payments. Please let me know if you need anything else. |
|
The short answer is to unexpire the ticket those registrations are assigned to. I’ve only had a brief look over the code and that function in question checks if the ticket used for the purchase is expired, if it is all pulls all of the tickets from the event and tries to use one that is not expired. Firstly that seems strange as its then going to recalculate line items based on a price that may not be the price the user registered for. I would think it should be using the line items directly and pulling in the ticket linked to them. Second, it could do with being a little more defensive, in the example above it pulls all tickets and tries to build an array of active tickets so it can use just one of them. If all the tickets are expired you get the above fatal because theres no check for an EE_Ticket before trying to call its method. Now, having said all of that, I’m pretty sure that method should not be running on a ‘revisit’ request unless you want prices to update then? Going back to my first point if you have ticket A at $10 and a user registers onto it, then you expire that ticket and make another at $20 if the user returns to pay after that point, the $20 will be used (I going off the code itself so would be worth while testing this to confirm), which seems strange but I don’t know the intent. So unexpiring the ticket for the registration in question should fix it but I think you should double check that functionality on a revisit with an expired ticket at different prices and likely just return out of that method is ‘revisit’ is set on spco. |
|
The support post ‘Imported Records with partial payments’ 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.