Home Forums Event Espresso Premium Event Registrations Purged from Database

Event Registrations Purged from Database

Posted: July 3, 2020 at 5:58 am


July 3, 2020 at 5:58 am

We’ve had two customers contact us because the event registrations they placed (using offline payment methods) have disappeared from our site. They were issued with invoices to be paid, but all record of their tickets, registrations and transactions are gone. We have downloaded a database backup from our host (WPEngine) from the day after one of the registrations was made, and can confirm we see the expected data in the wp_esp_registration table. If we check this table today, the rows are missing.

There has been no unauthorised access to the site nor its hosting.

Are there any circumstances under which data would be purged by Event Espresso itself?


  • Support Staff

July 7, 2020 at 9:09 am

Hi there,

Apologies for the delayed reply.

We have one method which removes registrations on a cron schedule here:

EE_Maintenance_Mode::instance()->models_can_query() just confirms that EE isn’t in full maintenance mode.

EED_Ticket_Sales_Monitor::reset_reservation_counts(); as the name suggests resets the ticket reservation count for expired sessions (no registrations etc removed there).

So the start is EEM_Transaction::instance('')->delete_junk_transactions();

Which is shown HERE.

The default query_args (filtered so may well have been changed by other code on the site) checks for transactions with a ‘failed’ status, note this is NOT a failed payment status, but a transaction status of failed which is set when the transaction is first created.

AND no payment objects associated with the transaction at all (invoice wont have any payment objects)

AND are older than 1 week (again 1 week by default, the value is filtered).

Any transactions its finds that match, it removes.

Then we run EEM_Registration::instance('')->delete_registrations_with_no_transaction(); found HERE.

Deletes any registrations in which a transactions doesn’t exist for (every registration within EE should be assigned to a transaction unless the above removed it).

Finally EEM_Line_Item::instance('')->delete_line_items_with_no_transaction(); found HERE. Which removes line items that belong to Transactions in which the ID doesn’t exist.

So for that cleanup job to remove the registration it all starts from the transaction and it needed to have a status of ‘TFL’ in the database (which it should not if the user made it even to the payment options step), so if you have the database saved, check the esp_registration table, find the registration in question and note the TXN_ID linked to it. What value is it?

Then check esp_transaction and check the STS_ID for the row using that TXN_ID, what is it?

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

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 month ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!