Actions & filters

Usage

Fast Events has a number of action- and filter hooks that can be used to inject custom specific code. Take a look at the examples paragraph of the functions to get an idea how to use them.

If you want to use the filter and action hooks, there are generally a few options.

  1. You add your code to the functions.php file of your theme. The downside of this approach is that every time your theme gets an update you have to redo your changes.

  2. Add it to a function in a child theme. This way you don’t have to redo your code if the theme gets an update, but it requires more knowledge.

  3. Write you own plugin. You have to be a seasoned developer to go down this path.

  4. Or…. use a plugin that does most of the magic for you. If you just want to use a limited set of filters and or action hooks we strongly advice you to take this route. Install the Code snippets plugin. All the examples in the functions can be easy copied into Snippets of this plugin. Most examples are easy to understand and easy to adjust.

Tip

If you have made a nice snippet yourself, let us know, and we will include it in the documentation as an example.

Reference

fast_events_custom_status

This filter is called after a custom order status change from the order contextmenu. It can only be used if the ‘Custom order statuses’ field has been set in the plugin settings.

fast_events_email_api_result

This action is called after an order email has been send to the email-provider (Host-email, SMTP, Amazon SES, Mailgun, …). This call is made with both a successful email and an incorrect email (submission failed).

fast_events_input_fields

This filter is called after a basic check of all input and ticket fields.

fast_events_new_order

This action is called after the payment has been received and the customer has already received an email.

fast_events_new_order_text

Filter the default error text while processing the order and change the text if necessary.

fast_events_scan_error_text

This filter is called if there is a scan error. Normally the API returns the localized error, but you can override it and create your own version. You can make the error-string even more specific by using the scancode that is linked to a specific entrance.

fast_events_scan_filter_output

This filter is called just before the output is sent back to the Android or IOS scan app. You can change any of the text lines in the qrcode block.

fast_events_scan_ticket

This action is called after the ticket has been scanned.

fast_events_ticket_text

This filter is called just before the text of the qrcode block is printed on the ticket template.