Support

Home Forums Event Espresso Premium Imported Records with partial payments

Imported Records with partial payments

Posted: August 27, 2020 at 12:30 am

Viewing 12 reply threads


Somatic Practice

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?


Tony

  • Support Staff

August 28, 2020 at 5:18 am

Hi there,

I’d like to reproduce this, may I ask how the users are returning to make an additional payment?


Somatic Practice

August 28, 2020 at 12:23 pm

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
https://ibb.co/4272j65

I could also send credentials to a staging site that you can see the issue on, if that would help.


Somatic Practice

August 31, 2020 at 5:55 pm

Just curios if you’ve been able to reproduce the issue or want access to the staging site?


Tony

  • Support Staff

September 1, 2020 at 10:49 am

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.


Somatic Practice

September 1, 2020 at 12:18 pm

Ok, great, thank you very much!


Tony

  • Support Staff

September 1, 2020 at 3:44 pm

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.


Somatic Practice

September 2, 2020 at 11:35 am

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.


Tony

  • Support Staff

September 2, 2020 at 12:00 pm

Check your servers error logs, the above message would normally mean an error is logged.

Post that here, please.


Somatic Practice

September 2, 2020 at 9:16 pm

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
Stack trace:
#0 /www/wp-includes/class-wp-hook.php(287): PROCESS_PARTIAL_PAYMENT_EE->process_partial_payment_change_line_item_before_payment_options_step(Object(EE_Event), Object(EE_SPCO_Reg_Step_Payment_Options))
#1 /www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
#2 /www/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /www/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/reg_steps/payment_options/EE_SPCO_Reg_Step_Payment_Options.class.php(348): do_action(‘AHEE__EE_SPCO_R…’, Object(EE_Event), Object(EE_SPCO_Reg_Step_Payment_Options))
#4 /www/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/EED_Single_Page_Checkout.module.php(1254): EE_SPCO_Reg_Step_Payment_Options->generate_reg_form()
#5 /www/wp-content/plugins/event-espresso-core-reg/modules/single_page_chec in /www/wp-content/plugins/partial-payment-for-event-espresso/includes/process-partial-payment-ee-class.php on line 135


Tony

  • Support Staff

September 3, 2020 at 8:04 am

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.


Somatic Practice

September 3, 2020 at 12:49 pm

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.


Tony

  • Support Staff

September 3, 2020 at 1:54 pm

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.

Viewing 12 reply threads

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.

Event Espresso