HappenBoard and HappenBoard Pro fire WordPress actions and filters at the points you are most likely to customize: sign-up forms, emails, Event schema, booking slots, imports and more. This page explains where your code goes and how the hooks behave. The reference pages listed at the end document each hook with its arguments and an example.
Where your code goes
Put your code in a small plugin of your own: a PHP file with a Plugin Name header in wp-content/plugins/, or a must-use plugin in wp-content/mu-plugins/. A child theme’s functions.php also works, with one limit explained below.
Never edit HappenBoard’s own files. The next update replaces them and your changes are lost.
Start your code on happenboard_loaded
HappenBoard fires happenboard_loaded during plugins_loaded, once all its services have attached their hooks. Register your callbacks from there:
<?php
/**
* Plugin Name: My HappenBoard tweaks
*/
add_action(
'happenboard_loaded',
function (): void {
add_filter( 'happenboard_schema_event', 'my_schema_audience', 10, 2 );
}
);
function my_schema_audience( $schema, $event_id ) {
// Mark events of the "Kids" category as aimed at children.
if ( has_term( 'kids', 'happenboard_category', $event_id ) ) {
$schema['audience'] = array( '@type' => 'Audience', 'audienceType' => 'Children' );
}
return $schema;
}
Hooking in this way gives you three guarantees:
- Your code runs only when HappenBoard is active. If someone deactivates it, the action never fires and nothing breaks.
- HappenBoard’s classes and functions can be used inside the callback.
- HappenBoard Pro boots from the same action, at priority 10. Use
happenboard_pro_loadedfor code that needs Pro.
Post types, taxonomies and blocks are registered later, on init, as in any plugin. Plugin lifecycle hooks shows the full load order and the uninstall actions.
In a child theme, skip happenboard_loaded. A theme’s functions.php loads after that action has fired, so a callback attached there never runs. Add your filters directly instead, and test did_action( 'happenboard_loaded' ) if you need to know whether HappenBoard is active.
How the hooks are named
- Every hook name starts with
happenboard_. - Hooks added by HappenBoard Pro start with
happenboard_pro_. The exceptions keep older names:happenboard_badges_per_sheet,happenboard_event_submitted,happenboard_stripe_checkout_completed,happenboard_stripe_refundedand the six MailerPress triggers that start withhappenboard_mp_. - Pro also fires some free hooks itself. For example,
happenboard_rsvp_submittedalso runs when a ticket order creates attendees. Each entry says whether the free plugin, Pro or both fire it. - Two email filters have a name built from the email template:
happenboard_notifications_{$template_id}andhappenboard_notifications_booking_{$template_id}. - One hook lives in JavaScript: the
happenboard.term.colorPresetsfilter of@wordpress/hooks, for the color swatches. It is documented next to its PHP twin,happenboard_term_color_presets.
Filters, actions and arguments
A filter hands you a value and expects it back, changed or not. Always return a value of the same type: several hooks cast or drop a value of the wrong type. An action tells you that something happened and ignores what you return.
When a hook passes more than one argument, give the number you want as the fourth parameter of add_filter() or add_action(). Without it, WordPress passes only the first one. In the example above, 10, 2 asks for $schema and $event_id. The filter also passes the post object as a third argument, which this callback does not need.
The third parameter is the priority. Pro hooks several free filters at the default priority 10, so use a higher number, such as 20, to change a value after Pro has.
Find the hook you need
Each reference page below covers one area and opens with a table of its hooks. Every entry gives the hook type, the edition that fires it, the file it lives in, its signature and arguments, an example and the known pitfalls. Open that file in the plugin when you need the code around the hook.
- Hook reference index: every hook in one alphabetical table.
- Plugin lifecycle hooks: boot, uninstall, and Pro’s licence and update requests.
- Events, recurrence and series hooks: event dates and series, event addresses, deletion and submitted events.
- Attendees and sign-up hooks: the RSVP form, registrations, attendee changes and seats left.
- Appointment booking hooks: slots, hosts, prices, payments and each step of a booking.
- Notification and email hooks: email language, templates, reminders and MailerPress triggers.
- Block, schema and rendering hooks: blocks, classic themes, maps, weather, the iCal feed and the Event schema.
- Admin, roles and capability hooks: admin screens, capabilities and the limit on public booking lookups.
- Migration, import and export hooks: migration sources and the settings backup file.
- Ticketing and payment hooks: Pro tickets, Stripe and WooCommerce orders, refunds and card holds.
- Calendar sync, webhook and check-in hooks: Google and Outlook sync, outgoing webhooks, check-in and badges.
- Agent and ability hooks: what AI agents may do on the site and the log of what they did.