Tickets that were created after the FooEvents Bookings plugin was updated to version 1.4.0 include a custom field called ‘WooCommerceEventsBookingDateTimestamp‘. Only tickets that include this custom field can be filtered down to a date level using the FooEvents Bookings management screen (Go to FooEvents > Bookings).
In order to filter past tickets by booking date, you will need to run a script that adds the relevant custom fields to all tickets that were generated before the custom meta was implemented. To make it easier for you to do this, we have created a simple plugin that will allow you to run the updates in small batches. If you would like to proceed and add the timestamp custom field to previous tickets, please follow these steps:
- NB: We highly recommend that you first create a back-up of your current website files and database before proceeding beyond this point and make use of a staging site if possible
- Download the FooEvents Bookings Timestamp Updater plugin
- Login to your WordPress Admin Dashboard
- Go to Plugins > Add New in the main menu
- Upload the plugin zip file
- Click on Plugins in the main menu
- Find the plugin and click Activate
- Go to FooEvents Bookings Timestamp Updater in the main menu
- This screen will allow you to add the custom field timestamp that can be used to filter the tickets by booking date. By default, the FooEvents Bookings Timestamp Updater will update 100 orders at a time. This is a safe limit and should only take a second to complete. Depending on the size of your database and the capacity of your server, you can adjust the amount as needed.
- Once you have set the preferred amount, click the Run Updater button. The FooEvents Bookings Timestamp Updater plugin will then update the specified number of tickets.
- After each batch has completed, continue to run the updater by clicking the Run Updater button until there are no remaining tickets that require updates.
- When zero tickets remain, please remove the FooEvents Bookings Timestamp Updater plugin by going to Plugins in the main menu and then deactivating and deleting the FooEvents Bookings Timestamp Updater plugin.
All tickets that did not previously include the timestamp custom field should now include this field and reflect when filtering bookings by date.