Home Forums Event Espresso Premium Registration error

Registration error

Posted: October 14, 2021 at 12:29 pm


October 14, 2021 at 12:29 pm

I have had multiple reports of users receiving this error when trying to register for an event: “There has been a critical error on this website. Learn more about troubleshooting WordPress.” Including a screenshot below.

After doing some testing, it looks like this is user error due to not selecting their ticket type before clicking the Register button. Knowing that people are people, and they don’t like to read, hoping there’s a better way to handle this error rather than redirecting to such a nondescript page. Assuming since multiple people have reported the problem, more will do the same thing in the future.


Event link issue reported on:

Any ideas?


  • Support Staff

October 14, 2021 at 1:55 pm

Hi there,

We’ll need the error being thrown to fix that as it’s not normal, it should show a notice and not throw an error.

If you edit your sites wp-config.php file and add this:

You should already have something like define( 'WP_DEBUG', false); and the above snippet would replace that, however, I think you may already have this code in your wp-config.php but with WP_DEBUG set to false so check before pasting it in.

Let me know when that’s in place and I’ll run a test on the site.


October 14, 2021 at 3:01 pm


Just updated it to include what you provided.



  • Support Staff

October 14, 2021 at 3:46 pm

Hi Stephanie,

It’s from the custom code I gave you in your other thread:

I’ve updated the gist to include an additional check, pleas update the code on your end to match which should prevent the error.


October 14, 2021 at 3:53 pm

Thanks Tony! I’ve updated it.Is it possible for you to run your test again to make sure we’re good?

I made sure to add these lines you gave me back after updating the code to that latest version

$category instanceof EE_Term
&& $category->ID() == 61
&& $datetime instanceof EE_Datetime
) {


  • Support Staff

October 14, 2021 at 4:04 pm

It looks like you’ve added the above code twice.

The error currently being thrown is:

PHP Fatal error: Cannot redeclare tw_ee_add_additional_regs_to_cart() (previously declared in /wp-content/plugins/customEEplugin/customEEplugin_alldayevents.php:129) in /wp-content/plugins/customEEplugin/customEEplugin_alldayevents.php on line 186

Remove the snippet from the bottom of the plugin and edit the one at the top to match πŸ™‚


October 14, 2021 at 4:07 pm

Whoops, forgot to remove the one I kept as a reference. Just resaved. Did that work?


  • Support Staff

October 14, 2021 at 4:14 pm

Yep, that’s fixed it, and the notices work, and the functionality still works as expected as far as I can tell πŸ™‚


October 14, 2021 at 4:25 pm

Fantastic, thank you!


  • Support Staff

October 15, 2021 at 4:05 am

You’re most welcome πŸ™‚

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

Event Espresso