Topics

⌘K
  1. Home
  2. Docs
  3. Topics
  4. Code Snippets
  5. FooEvents Bookings Timestamp Updater

FooEvents Bookings Timestamp Updater

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).

Screenshot 2022 08 25 at 13.23.08

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:

  1. 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
  2. Download the FooEvents Bookings Timestamp Updater plugin
  3. Login to your WordPress Admin Dashboard
  4. Go to Plugins > Add New in the main menu
  5. Upload the plugin zip file
  6. Click on Plugins in the main menu
  7. Find the plugin and click Activate
  8. Go to FooEvents Bookings Timestamp Updater in the main menu
  9. Screenshot 2022 08 30 at 10.54.40This 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.
  10. 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.
  11. Screenshot 2022 08 30 at 10.55.18After each batch has completed, continue to run the updater by clicking the Run Updater button until there are no remaining tickets that require updates.
  12. Screenshot 2022 08 30 at 10.56.16When 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.

Tags , , , ,