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_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_invoice

Download your own designed invoice possibly using an external financial accounting package.

fast_events_mail_charset

This filter is called when an email is sent. Change the character set used in the email.

fast_events_mail_from

This filter is called when an email is sent. Change the From address based on order information.

fast_events_mail_from_name

This filter is called when an email is sent. Change the From address name based on order information.

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_order_mail

The filter is called for every new order. Filter the email address and return a WP_Error if necessary.

fast_events_order_name

The filter is called for every new order. Filter the name and return a WP_Error 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.