Gym Builder 3.3.0 has 50 actions and 133 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Gym Builder fires an action
add_action( 'gym_builder_after_main_content', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Gym Builder is about to use
add_filter( 'gym_builder_register_button', function( $value, $class_id, $arg3 ) {
// Change $value here.
return $value;
}, 10, 3 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * This filter is documented in render_button(). */ apply_filters( 'gym_builder_register_button', true, $class_id, 'timetable' ); -
/** * Hook: gym_builder_after_main_content. */ do_action( 'gym_builder_after_main_content' ); -
/** * Hook: gym_builder_after_main_content_wrapper. */ do_action( 'gym_builder_after_main_content_wrapper' ); -
/** * Hook: gym_builder_before_main_content. */ do_action( 'gym_builder_before_main_content' ); -
/** * Hook: gym_builder_before_main_content_wrapper. */ do_action( 'gym_builder_before_main_content_wrapper' ); -
/** * Whatever an add-on wants on the picture — the Zoom add-on's online / * offline badges answer this. */ do_action( 'gym_builder_class_type_badge', $class_id ); -
/** * Plans a member holds through an add-on, one entry per purchase; renewals of * the same plan through the same channel are merged. */ apply_filters( 'gym_builder_member_plans', [], $member ); -
/** * What an add-on wants to say about this trainer — the Personal Session * add-on answers this with its star rating. */ do_action( 'gym_builder_shortcode_trainer_after_title', $trainer_id ); -
/** * A class was booked from the timetable. */ do_action( 'gym_builder_timetable_registered', $member_id, $booking, false ); -
/** * Hook: gym_builder_loop_item_after_content. */ do_action( 'gym_builder_loop_item_after_content' ); -
/** * This action is documented in inc/Controllers/Models/MemberBulkActions.php */ do_action( 'gym_builder_member_deleted', $member_id ); -
/** * Hook: gym_builder_schedule_booking. */ do_action( 'gym_builder_schedule_booking', $session['booking'] ); -
/** * This filter is documented below. */ apply_filters( 'gym_builder_timetable_show_spots', true, $context, $info ); -
/** * Hook: gym_builder_after_trainer_single_content. */ do_action( 'gym_builder_after_trainer_single_content', $trainer_id ); -
/** * An add-on loads the script that draws its app pages here. */ do_action( 'gym_builder_app_enqueue', self::HANDLE ); -
/** * Whether an old page's address opens its page in the app. An add-on returns * false while its old page has to show itself, for example a licence screen * that must be filled in first. */ apply_filters( 'gym_builder_app_redirect_old_page', true, $page ); -
/** * Beside the class, where core's booking card sits: Class Booking & Payment * puts its booking form here. */ do_action( 'gym_builder_class_booking_side', $class_id ); -
/** * The visitor's IP address used for rate limits. */ apply_filters( 'gym_builder_client_ip', $ip ); -
/** * Figures for the Dashboard's second row of tiles. */ apply_filters( 'gym_builder_dashboard_figures', [] ); -
/** * Setup problems for the Gym Builder dashboard health card. */ apply_filters( 'gym_builder_dashboard_health', [] ); -
/** * Money a payment add-on received between two moments in site time. */ apply_filters( 'gym_builder_dashboard_payments', [], $from, $to ); -
/** * The words of that link on the tile, such as "View Reports". */ apply_filters( 'gym_builder_dashboard_payments_action', __( 'See the Details', 'gym-builder' ) ); -
/** * Where "Payments this month" opens, such as a reports page. Empty for no * link. */ apply_filters( 'gym_builder_dashboard_payments_url', '' ); -
/** * Add-ons move their edit-screen boxes into the new screen. Each card: */ apply_filters( 'gym_builder_edit_screen_cards', [], $post ); -
/** * A member was added from a CSV file. */ do_action( 'gym_builder_member_imported', $row_id, $d ); -
/** * Whether the seat saved on a single-class member's row is still counted in * total_booked. An add-on that already handed it back (a payment add-on * freeing it when a subscription ended, leaving the class on the row) returns * false, so a delete does not free it twice. */ apply_filters( 'gym_builder_member_row_seat_held', true, (int) $member_id, $row ); -
/** * Fires after a member was given a new member ID. */ do_action( 'gym_builder_member_user_id_changed', (int) $row_id, (string) $old, $new ); -
/** * A payment add-on moves the end of its own plan by $days. */ apply_filters( 'gym_builder_membership_extend', false, $member, $plan, (int) $days, $new_end ); -
/** * Fires after a pause was ended early or called off. */ do_action( 'gym_builder_membership_pause_ended', (int) $member->id, $back, $unused ); -
/** * Why an add-on cannot let this membership pause, such as a card payment that * failed. Return the reason, shown to the gym; '' to allow. */ apply_filters( 'gym_builder_membership_pause_error', '', $member, $from, $days ); -
/** * Fires after a membership was paused and its dates moved. */ do_action( 'gym_builder_membership_paused', (int) $member->id, $from, $until ); -
/** * Move the dates an add-on keeps for this member: each date on or after $from * moves by $days (back when negative). Return a WP_Error to stop; the gym sees * its message and core's dates stay as they are. */ apply_filters( 'gym_builder_membership_shift', true, $member, $from, (int) $days ); -
/** * Fires after memberships have been lapsed by the daily task. */ do_action( 'gym_builder_memberships_lapsed', $lapsed, $ids ); -
/** * The email telling a member their membership is paused, before it is sent. */ apply_filters( 'gym_builder_pause_mail', [ 'subject' => $subject, 'body' => $body ], $member, $pause ); -
/** * A payment add-on took a registration: the visitor is now paying (or placing * an order) for this class time and plan. */ do_action( 'gym_builder_registration_payment_started', $who, $booking, (int) $plan_id, $result ); -
/** * How many days before expiry the reminder goes out. */ apply_filters( 'gym_builder_renewal_reminder_days', $days ); -
/** * The renewal reminder before it is sent. */ apply_filters( 'gym_builder_renewal_reminder_mail', [ 'subject' => $subject, 'body' => $body, ], $member ); -
/** * Members whose membership renews by itself. They are left out of the renewal * reminder, the Dashboard's "Ending soon" figure and the Expiring Soon filter * on Members. */ apply_filters( 'gym_builder_renewing_member_ids', [] ); -
/** * Allow other integrations to report that the page is already rendered. */ apply_filters( 'gym_builder_request_already_rendered', $rendered, $template ); -
/** * The business node. */ apply_filters( 'gym_builder_schema_business', $node ); -
/** * Switch the markup off wholesale — for a site whose SEO plugin already * describes the business, or which does not want this at all. */ apply_filters( 'gym_builder_schema_enabled', true ); -
/** * One session's Event node. The Zoom add-on changes the attendance mode here * for a slot it has marked online. */ apply_filters( 'gym_builder_schema_event', $node, $class_id, $day, $row ); -
/** * The whole graph, before it is printed. */ apply_filters( 'gym_builder_schema_graph', $graph ); -
/** * The trainer node. */ apply_filters( 'gym_builder_schema_person', $node, $trainer_id ); -
/** * A class time's number of places changed. More places (or no limit) may let * people waiting for it in. */ do_action( 'gym_builder_slot_capacity_changed', (int) $class_id, (string) $day, (string) $time, (int) $old_total, (int) $new_total ); -
/** * A class time's seat count changed (places freed when $new < $old). Fires * after the count is saved, possibly while the slot is still locked: queue * work rather than booking from here. */ do_action( 'gym_builder_slot_seats_changed', $m[0], $m[1], $m[2], $m[3], $m[4] ); -
/** * A member was booked into class times they did not hold before, by any route * (admin, timetable, popup, a payment add-on). Fires after the rows are saved * and the slots unlocked. */ do_action( 'gym_builder_slots_booked', (int) $member_id, $slots ); -
/** * Whether sign-up and checkout forms ask the member to agree to the terms. */ apply_filters( 'gym_builder_terms_required', self::settings()['on'] ); -
/** * A last say on a timetable registration before anything is saved — for a * CAPTCHA or another spam check. Return a WP_Error to refuse it; its message * is shown in the form. */ apply_filters( 'gym_builder_timetable_registration_check', true, wp_unslash( $_POST ) ); -
/** * A trainer sign-up was declined and deleted. */ do_action( 'gym_builder_trainer_declined', $id, $email, $sent ); -
/** * Two different things arrive on that one hook, and they belong in two * different places: a booking widget is an action, so it goes in the rail * where it stays in view, and a list of reviews is reading, so it goes at the * end of the article. */ apply_filters( 'gym_builder_trainer_rail_addon_markup', [ '#<div[^>]*id=["\']gbps_booking_public_root["\'][^>]*>.*?</div>#is', ] ); -
/** * Return false to keep the old boxes on a post type's edit screen. */ apply_filters( 'gym_builder_use_new_edit_screens', true, $post_type ); -
/** * Someone on the waitlist got a place in the class time. */ do_action( 'gym_builder_waitlist_booked', $entry, $member_id ); -
/** * The waitlist button's HTML. */ apply_filters( 'gym_builder_waitlist_button', $html, $state, $class_id, $day, $time, $context ); -
/** * Whether a place may be offered to someone on the waitlist now. */ apply_filters( 'gym_builder_waitlist_can_offer', $ok, $entry ); -
/** * Minutes a place stays held while its claimant pays. */ apply_filters( 'gym_builder_waitlist_claim_minutes', 60 ); -
/** * The page that takes a claim for a class another plugin sells. */ apply_filters( 'gym_builder_waitlist_claim_url', '', $entry ); -
/** * Someone started paying for the place held for them. */ do_action( 'gym_builder_waitlist_claimed', WaitlistEntries::get( $entry->id ) ); -
/** * Whether the class waitlist is on. */ apply_filters( 'gym_builder_waitlist_enabled', $on ); -
/** * A place held for someone ran out and goes to the next person. */ do_action( 'gym_builder_waitlist_expired', $entry ); -
/** * Days an ended membership keeps its place once warned. */ apply_filters( 'gym_builder_waitlist_grace_days', $days ); -
/** * Whether a place held for someone on the waitlist counts as taken. */ apply_filters( 'gym_builder_waitlist_hold_counted', true, $entry ); -
/** * Hours an offered place is held. */ apply_filters( 'gym_builder_waitlist_hold_hours', $hours ); -
/** * A last say on joining the waitlist, for a CAPTCHA or another spam check. * Return a WP_Error to refuse it; its message is shown. */ apply_filters( 'gym_builder_waitlist_join_check', true, wp_unslash( $_POST ) ); -
/** * Someone joined the waitlist. */ do_action( 'gym_builder_waitlist_joined', $entry, $position ); -
/** * Someone left the waitlist or was taken off it. */ do_action( 'gym_builder_waitlist_left', $entry, $by ); -
/** * The claim or leave link in waitlist emails. */ apply_filters( 'gym_builder_waitlist_link', $url, $entry, $action ); -
/** * A waitlist email before it is sent. Return false to skip it. */ apply_filters( 'gym_builder_waitlist_mail', $mail, $kind, $entry, $extra ); -
/** * A place was offered to someone on the waitlist and is held for them. */ do_action( 'gym_builder_waitlist_offered', $entry, $by_staff ); -
/** * Most class times one person may wait for at once. */ apply_filters( 'gym_builder_waitlist_per_person', 5 ); -
/** * A member asked to swap one of their class times for a place held for them on * the waitlist. */ do_action( 'gym_builder_waitlist_swap_requested', $entry ); -
/** * The email after a membership ended, before it is sent. */ apply_filters( 'gym_builder_winback_mail', [ 'subject' => $subject, 'body' => $body, ], $member ); -
/** * Let a payment add-on take a registration before anything is created. */ apply_filters( 'gym_builder/registration_checkout', null, $who + [ 'package_id' => (int) $plan_id, 'bookings' => array_merge( [ $booking ], $more ), ] ); -
/** * Filters whether the site counts as having SMTP email set up, which hides the * "Set Up SMTP Email" notice. */ apply_filters( 'gym_builder/smtp_notice/mail_set_up', $set_up ); -
/** * This action is documented in wp-includes/user.php */ do_action( 'wp_login', $user->user_login, $user ); -
apply_filters( 'gym_builder_slot_seats_taken', $booked[ $id . '|' . $slot ] ?? 0, $id, $time['day'], $time['range'] ); -
apply_filters( 'gym_builder_app_pages', [] ); -
apply_filters( 'gym_builder_array_classes_category_list', $categories_list ); -
apply_filters( 'gym_builder_array_trainer_category_list', $categories_list ); -
do_action( 'gym_builder_class_loop_buy_button', $class_id ); -
do_action( 'gym_builder_class_page_buy_button', $class_id ); -
apply_filters( 'gym_builder_class_page_layout', $layout ); -
apply_filters( 'gym_builder_single_sidebar_title', esc_html__( 'Gym Builder - Class Single Sidebar', 'gym-builder' ) ); -
apply_filters( 'class_pricing_info_fields', $pricing_info ); -
apply_filters( 'fitness_calculator_translatable_text', $text ); -
apply_filters( 'gb_class_meta_sc_builder', $metas, $meta ); -
apply_filters( 'gb_class_shortcode_basic_meta', $fields ); -
apply_filters( 'gb_class_shortcode_filtering_meta', $fields ); -
apply_filters( 'gb_class_shortcode_image_meta', $fields ); -
apply_filters( 'gb_fintess_calculator_shortcode_basic_meta', $fields ); -
apply_filters( 'gb_fitness_bmi_calc_layout', $layout ); -
apply_filters( 'gb_fitness_calc_meta_sc_builder', $metas, $meta ); -
apply_filters( 'gb_trainer_meta_sc_builder', $metas, $meta ); -
apply_filters( 'gb_trainer_shortcode_basic_meta', $fields ); -
apply_filters( 'gb_trainer_shortcode_filtering_meta', $fields ); -
apply_filters( 'gb_trainer_shortcode_image_meta', $fields ); -
apply_filters( 'get_members_data_sql', $sql ); -
apply_filters( "gym_builder_{$this->post_type}_query", $args ); -
apply_filters( "gym_builder_{$this->post_type}shortcode_query", $args ); -
do_action( 'gym_builder_after_class_single_content', $class_id ); -
do_action( 'gym_builder_after_template_part', $template_name, $located, $args ); -
apply_filters( 'gym_builder_ajax_post_exclude', [ 'attachment', 'revision', 'nav_menu_item', 'elementor_library', 'tpg_builder', 'e-landing-page' ] ); -
apply_filters( 'gym_builder_app_capability', 'manage_options' ); -
apply_filters( 'gym_builder_app_links', [] ); -
apply_filters( 'gym_builder_app_locked', [] ); -
apply_filters( 'gym_builder_app_reload_on', [ 'gym_builder_class_settings.waitlist' ] ); -
apply_filters( 'gym_builder_app_settings_sections', [] ); -
apply_filters( 'gym_builder_archive_sidebar_title', esc_html__( 'Gym Builder - Class Archive Sidebar', 'gym-builder' ) ); -
apply_filters( 'gym_builder_array_membership_packages_type_list', $type_list ); -
do_action( 'gym_builder_before_template_part', $template_name, $located, $args ); -
do_action( 'gym_builder_class_booking_button', $class_id ); -
apply_filters( 'gym_builder_class_location', self::get( (string) ( $row['location'] ?? '' ) ), $row, (int) $class_id ); -
do_action( 'gym_builder_class_page_booking', [ 'class_id' => $class_id, 'class_name' => get_the_title( $class_id ), 'time_range' => gmdate( 'g:ia', strtotime( $gb_row['start_time'] ) ) . ( ! empty( $gb_row['end_time'] ) ? ' - ' . gmdate( 'g:ia', strtotime( $gb_row['end_time'] ) ) : '' ), 'class_day' => $gb_days[ $gb_row['week'] ] ?? '', ] ); -
apply_filters( 'gym_builder_class_schedule_fields', $fields ); -
apply_filters( 'gym_builder_class_schedule_repeater_fields', $fields ); -
apply_filters( 'gym_builder_class_shortcode_layout', $layout ); -
apply_filters( 'gym_builder_class_slider_settings', $slider_settings ); -
do_action( 'gym_builder_class_type', $gb_row ); -
apply_filters( 'gym_builder_currency_list', [ 'AED' => [ 'code' => 'AED', 'symbol' => 'د.إ', 'name' => 'United Arab Emirates Dirham', 'numeric_code' => '784', 'code_placement' => 'before', 'minor_unit' => 'Fils', 'major_unit' => 'Dirham', ], 'AFN' => [ 'code' => 'AFN', 'symbol' => 'Af', 'name' => 'Afghan Afghani', 'decimals' => 0, 'numeric_code' => '971', 'minor_unit' => 'Pul', 'major_unit' => 'Afghani', ], 'ANG' => [ 'code' => 'ANG', ... ); -
apply_filters( 'gym_builder_custom_pages_list', $pages ); -
apply_filters( 'gym_builder_day_name_map', $days ); -
apply_filters( 'gym_builder_fitness_calculator_types', $types ); -
apply_filters( 'gym_builder_get_template', $located, $template_name, $args ); -
apply_filters( 'gym_builder_get_template_part', $template, $slug, $name ); -
apply_filters( 'gym_builder_guest_places_per_day', 2 ); -
apply_filters( 'gym_builder_icons', $icons ); -
apply_filters( 'gym_builder_is_class', self::is_classes() || self::is_class_taxonomy() || self::is_single_class() ); -
apply_filters( 'gym_builder_is_class_page', is_post_type_archive( self::$class_post_type ) || is_page( self::get_page_id( 'classes' ) ) ); -
apply_filters( 'gym_builder_is_trainer', self::is_trainers() || self::is_trainer_taxonomy() || self::is_single_trainer() ); -
apply_filters( 'gym_builder_is_trainer_page', is_post_type_archive( self::$trainer_post_type ) || is_page( self::get_page_id( 'trainers' ) ) ); -
apply_filters( 'gym_builder_locate_template', $template, $template_name ); -
apply_filters( 'gym_builder_locate_template_files', $template_files, $template_name, $template_path, $default_path ); -
apply_filters( 'gym_builder_loop_item_wrapper_start', '<div class="class-content">' ); -
apply_filters( 'gym_builder_member_detail_panels', [], $result ); -
apply_filters( 'gym_builder_membership_package_price_modifier', $price, $id ); -
do_action( 'gym_builder_multiclass_run_migration' ); -
apply_filters( 'gym_builder_offer_notice', $this->the_options() ); -
apply_filters( 'gym_builder_orderby_query_options', $options ); -
apply_filters( 'gym_builder_package_features_display', $package_features, get_the_ID() ); -
apply_filters( 'gym_builder_page_title', $page_title ); -
apply_filters( 'gym_builder_plan_per_class_error', $error, $bookings, $access, $previous ); -
apply_filters( 'gym_builder_plugin_template_path', self::get_file_locations('plugin_path').'templates/' ); -
apply_filters( 'gym_builder_post_types', $this->post_types ); -
do_action( 'gym_builder_pricing_plan_buy_button', get_the_ID() ); -
apply_filters( 'gym_builder_primary_color', SettingsApi::get_option( 'gym_builder_primary_color', 'gym_builder_style_settings' ) ?: '#005dd0' ); -
apply_filters( 'gym_builder_reverse_day_name_map', $days ); -
apply_filters( 'gym_builder_routine_weeknames_short', $weeknames ); -
apply_filters( 'gym_builder_scripts_supported_post_types', [ 'gym_builder_class', 'gym_builder_trainer', 'gb_class_shortcode', 'gb_trainer_shortcode', 'gb_pricing_plan', 'gb_fitness_shortcode' ] ); -
apply_filters( 'gym_builder_secondary_color', SettingsApi::get_option( 'gym_builder_secondary_color', 'gym_builder_style_settings' ) ?: '#0a4b78' ); -
apply_filters( 'gym_builder_setup_addons', $addons ); -
apply_filters( 'gym_builder_setup_samples', $samples ); -
apply_filters( 'gym_builder_show_page_title', true ); -
apply_filters( 'gym_builder_sidebar', $classes ); -
do_action( 'gym_builder_student_dashboard_after_cards', $member, $current_user ); -
do_action( 'gym_builder_student_dashboard_after_grid', $member, $current_user ); -
do_action( 'gym_builder_student_dashboard_before_grid', $member, $current_user ); -
do_action( 'gym_builder_student_dashboard_header_actions', $member, $current_user ); -
apply_filters( 'gym_builder_taxonomies', $this->taxonomies ); -
apply_filters( 'gym_builder_template_loader_default_file', $default_file ); -
apply_filters( 'gym_builder_template_loader_fallback_file', $template, $default_file ); -
apply_filters( 'gym_builder_template_loader_files', $templates, $default_file ); -
apply_filters( 'gym_builder_template_path', 'gym-builder/' ); -
apply_filters( 'gym_builder_theme_slug_for_templates', get_option( 'template' ) ); -
apply_filters( 'gym_builder_trainer_archive_sidebar_title', esc_html__( 'Gym Builder - Trainer Archive Sidebar', 'gym-builder' ) ); -
apply_filters( 'gym_builder_trainer_card_action', $action, $trainer_id, $teaching ); -
apply_filters( 'gym_builder_trainer_colour', Helper::get_primary_color(), $trainer_id ); -
apply_filters( 'gym_builder_trainer_info', $trainer_info ); -
apply_filters( 'gym_builder_trainer_loop_item_wrapper_start', '<div class="trainer-content">' ); -
apply_filters( 'gym_builder_trainer_page_layout', $layout ); -
do_action( 'gym_builder_trainer_profile_editable_button', $trainer_id, $trainer_status ); -
apply_filters( 'gym_builder_trainer_shortcode_layout', $layout ); -
apply_filters( 'gym_builder_trainer_socials', $trainer_socials ); -
apply_filters( 'gym_builder_weeknames_short', $weeknames ); -
apply_filters( "gym-builder_metabox_{$id}", $metaboxes ); -
apply_filters( "gym-builder_postmeta_field_{$id}", $fields ); -
do_action_ref_array( 'phpmailer_init', [ &$mailer ] ); -
apply_filters( 'shortcode_package_type_html_end', '</ul>' ); -
apply_filters( 'shortcode_package_type_html_start', '<ul class="package-type">' ); -
apply_filters( 'wp_get_attachment_image_attributes', $attr, $attachment, $gbImgSize );
Generated from Gym Builder's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: