Thrive Themes products come with a set of helpful hooks that allow developers to extend functionality, modify data, and trigger custom logic during specific events. This reference covers all developer-facing hooks across the Thrive product suite.
How to Use Hooks
Action hooks let you run custom code when a specific event occurs. Use add_action() to attach your function:
add_action( 'hook_name', 'your_function_name', 10, 2 );
Filter hooks let you intercept and modify data before it is processed or displayed. Use add_filter() and return the modified value:
add_filter( 'filter_name', 'your_function_name', 10, 2 );
Add your custom hooks in a child theme’s functions.php or in a site-specific plugin. Always prefix your function names (e.g., mycompany_) to avoid conflicts.
Quick Reference
| Product | Actions | Filters | Section |
|---|
| Thrive Apprentice | 39 | 5 | Course lifecycle, enrollment, assessments, certificates, drip, payments |
| Thrive Architect | 15 | 35 | Forms, events, content rendering, editor, styling, landing pages |
| Thrive Theme Builder | 12 | 28 | Templates, sections, skins, breadcrumbs, content types |
| Thrive Dashboard | 10 | 15 | Authentication, autoresponder, products, cache |
| Thrive Leads | 2 | 14 | Form display, lazy loading, targeting |
| Thrive Quiz Builder | 3 | 0 | Quiz lifecycle events |
| Thrive Ultimatum | 2 | 8 | Campaign events, display control |
| Thrive Ovation | 3 | 0 | Testimonial lifecycle |
| Thrive Automator | 1 | 4 | Initialization, data objects |
Thrive Apprentice
Course and Lesson Lifecycle
| Hook | Type | Parameters | Description |
|---|
thrive_apprentice_course_start | action | $course_details, $user_details | Student starts their first lesson in a course |
thrive_apprentice_course_finish | action | $course_details, $user_details | Student completes all lessons and assessments in a course |
thrive_apprentice_course_progress | action | $course, $user_details | Fires each time a lesson is completed (progress update) |
thrive_apprentice_lesson_start | action | $lesson_details, $user_details | Student begins viewing a lesson |
thrive_apprentice_lesson_complete | action | $lesson_details, $user_details | Student finishes a lesson |
thrive_apprentice_free_lesson_completed | action | $lesson_details, $user_details | Student completes a lesson marked as free for all |
thrive_apprentice_all_free_lessons_completed | action | $user_details, $course_id | Student completes all free lessons in a course |
thrive_apprentice_module_start | action | $module_details, $user_details | Student starts their first lesson in a module |
thrive_apprentice_module_finish | action | $module_details, $user_details | Student completes all lessons in a module |
thrive_apprentice_restricted_course | action | $course, $user_details | User without access tries to view a restricted course |
Example — Track course completions:
add_action( 'thrive_apprentice_course_finish', function( $course_details, $user_details ) {
$course_id = $course_details['course_id'];
$course_title = $course_details['course_title'];
$user_id = $user_details['ID'];
// Send to external system, log, or trigger email
}, 10, 2 );
Enrollment and Purchase
| Hook | Type | Parameters | Description |
|---|
tva_user_receives_product_access | action | $user (WP_User), $product (TVA\Product) | Primary enrollment hook — fires for purchases, role changes, and manual grants |
tva_purchase | action | $user (WP_User), $order_item (TVA_Order_Item), $order (TVA_Order) | Purchase completed (fires per order item) |
tva_grant_course_access | action | $user_id, $product_id, $payment_result | Access granted after Square payment |
tva_user_course_purchase | action | $user, $order, $initiator | Deprecated — use tva_purchase instead |
Example — React to new enrollments:
add_action( 'tva_user_receives_product_access', function( $user, $product ) {
$user_email = $user->user_email;
$product_name = $product->get_name();
// Sync to CRM, send welcome message, etc.
}, 10, 2 );
Assessments and Grading
| Hook | Type | Parameters | Description |
|---|
tva_assessment_submitted | action | $assessment (TVA_User_Assessment) | Student submits an assessment |
tva_assessment_passed | action | $assessment (TVA_User_Assessment) | Assessment graded — student passed |
tva_assessment_failed | action | $assessment (TVA_User_Assessment) | Assessment graded — student failed |
Certificates
| Hook | Type | Parameters | Description |
|---|
tva_certificate_verified | action | $certificate_data, $user_data, $course_data | Certificate is verified or viewed |
tva_certificate_downloaded | action | $certificate_data, $user_data, $course_data | Student downloads their certificate |
Drip Content
| Hook | Type | Parameters | Description |
|---|
tva_drip_content_unlocked_for_specific_user | action | $user (WP_User), $post (WP_Post), $product (WP_Term) | Drip-scheduled content released for a specific user |
tva_drip_content_unlocked_sitewide | action | $post (WP_Post), $product (WP_Term) | Drip-scheduled content released for all students |
Refunds and Subscriptions
| Hook | Type | Parameters | Description |
|---|
tva_order_refunded | action | $user (WP_User), $order_item (TVA_Order_Item), $order (TVA_Order) | Order refunded (any payment gateway) |
tva_subscription_cancelled | action | $user (WP_User), $order_item, $order | Stripe subscription cancelled |
tva_stripe_order_refunded | action | $order_item (TVA_Order_Item) | Stripe-specific refund processed |
tva_sendowl_order_refunded | action | $order (TVA_Order) | SendOwl-specific refund processed |
Files and Video
| Hook | Type | Parameters | Description |
|---|
tva_protected_file_download | action | $file (WP_Post), $user_details | Student downloads a protected file |
thrive_video_completed | action | $video_data (array with item_id, user_id) | Student completes watching a video |
Course Management
| Hook | Type | Parameters | Description |
|---|
tva_course_published | action | $course (TVA_Course_V2) | Course is published |
tva_after_save_course | action | $return (array), $request (WP_REST_Request) | Course saved or updated |
tva_course_after_delete | action | $term_id (int) | Course deleted |
Email Templates
| Hook | Type | Parameters | Description |
|---|
tva_prepare_new_user_email_template | action | email template object | Customize new user registration emails |
tva_prepare_new_course_welcome_email_template | action | email template object | Customize course welcome emails |
tva_prepare_certificate_email_template | action | email template object | Customize certificate emails |
tva_prepare_assessment_marked_email_template | action | email template object | Customize assessment grading notification emails |
tva_prepare_product_expiry_email_template | action | email template object | Customize product access expiry emails |
Stripe and Payment Webhooks
| Hook | Type | Parameters | Description |
|---|
tva_stripe_webhook | action | $stripe_event (Stripe Event) | Generic Stripe webhook handler |
tva_stripe_webhook_{event_type} | action | $stripe_event (Stripe Event) | Specific Stripe event (e.g., tva_stripe_webhook_charge.succeeded) |
tva_stripe_event_{type} | action | event data array | Internal Stripe event routing |
tva_settings_saved_{key} | action | $value (mixed) | Setting saved (e.g., tva_settings_saved_general) |
Apprentice Filters
| Hook | Type | Parameters | Description |
|---|
tva_can_be_marked_as_completed | filter | $can_complete (bool), $condition, $object_id | Customize lesson completion logic |
tva_access_manager_allow_access | filter | $allowed (bool) | Override access decisions |
tva_access_restrict_content | filter | $content (string), $product | Modify restricted content message |
tva_should_trigger_access_on_role_change | filter | $should_trigger (bool), $user_id, $role | Control which role changes trigger course access |
Example — Custom completion requirements:
add_filter( 'tva_can_be_marked_as_completed', function( $can_complete, $condition, $object_id ) {
// Add custom criteria before allowing lesson completion
return $can_complete;
}, 10, 3 );
Thrive Architect
| Hook | Type | Parameters | Description |
|---|
thrive_core_lead_signup | action | $form_data, $user_details | Fires on every lead form submission |
tcb_api_form_submit | action | (none) | Fires before API form submission |
tcb_contact_form_user_mail_after_send | action | (none) | Fires after contact form email is sent |
tcb_before_api_subscribe_data | filter | $data (array) | Modify form data before subscription processing |
tcb_api_subscribe_data | filter | $data (array) | Modify subscription data before sending to CRM |
tcb_api_subscribe_data_instance | filter | $data (array) | Modify data for a specific CRM connection instance |
tcb_api_subscribe_connections | filter | $connections (array) | Filter available CRM connections for a form |
tcb_parse_lead_gen_form_data | filter | $data (array) | Customize lead generation form data structure |
tcb_lead_generation_apis_with_tag_support | filter | $apis (array) | Filter CRM APIs that support tags |
tcb_spam_prevention_tools | filter | $tools (array) | Register custom spam prevention tools |
tcb_post_login_actions | filter | $actions (array) | Customize available post-login actions |
tcb_post_register_actions | filter | $actions (array) | Customize available post-registration actions |
Example — Process lead submissions:
add_action( 'thrive_core_lead_signup', function( $form_data, $user_details ) {
// $form_data contains email, name, and custom fields
// Send to your webhook, CRM, or custom service
wp_remote_post( 'https://your-webhook.com', [
'body' => json_encode( $form_data ),
] );
}, 10, 2 );
Event Manager and Triggers
| Hook | Type | Parameters | Description |
|---|
tcb_event_triggers | filter | $triggers (array), $context (array) | Register custom page event triggers |
tcb_event_actions | filter | $actions (array) | Customize available event actions |
tcb_event_action_classes | filter | $classes (array) | Register custom event action handler classes |
tcb_event_manager_action_tabs | filter | $tabs (array) | Customize action configuration UI tabs |
tcb_can_use_page_events | filter | $can_use (bool) | Control page events availability per post type |
tcb_overwrite_event_scripts_enqueue | filter | $overwrite (bool) | Override event system script loading |
tcb_animations | filter | $animations (array) | Customize CSS animation configuration |
Content Rendering and Templates
| Hook | Type | Parameters | Description |
|---|
tcb_get_post_content | filter | $content (string) | Filter post content before display |
tcb_save_post_content | filter | $content (string) | Modify content before saving to database |
tcb_alter_template_data | filter | $data (array) | Modify template metadata before rendering |
tcb_cloud_templates | filter | $templates (array) | Filter cloud templates list |
tcb_symbol_content | filter | $content (string) | Customize symbol (global element) content |
tcb_content_allowed_shortcodes | filter | $shortcodes (array) | Control which shortcodes are allowed in content |
tcb_post_list_query_args | filter | $args (array) | Modify post list WP_Query arguments |
tcb_post_list_excluded_post_ids | filter | $ids (array) | Exclude specific posts from post list |
tcb_render_shortcode_{tag} | filter | $output (string) | Render custom shortcode (dynamic suffix) |
tve_landing_page_content | filter | $content (string) | Modify landing page content output |
Editor Customization
| Hook | Type | Parameters | Description |
|---|
tcb_editor_enqueue_scripts | action | (none) | Enqueue custom scripts in the Architect editor |
tcb_hook_editor_head | action | (none) | Add content to the editor head section |
tcb_hook_editor_footer | action | (none) | Add content to the editor footer |
tcb_output_extra_editor_svg | action | (none) | Inject custom SVG icons into editor |
tcb_editor_javascript_params | filter | $params (array) | Customize editor JavaScript localization data |
tcb_elements | filter | $elements (array) | Filter available elements list |
tcb_element_instances | filter | $instances (array) | Register custom element instances |
tcb_is_editor_page | filter | $is_editor (bool) | Detect if current page is the editor |
tcb_backbone_templates | filter | $templates (array) | Customize Backbone.js UI templates |
tcb_display_button_in_admin_bar | filter | $display (bool) | Show or hide edit button in admin bar |
Styling and Colors
| Hook | Type | Parameters | Description |
|---|
tcb_action_global_colors | action | (none) | Fires when global colors are updated |
tcb_action_global_gradients | action | (none) | Fires when global gradients are updated |
tcb_global_styles | filter | $styles (array) | Filter all global styles before use |
tcb_global_colors_list | filter | $colors (array) | Filter the global colors list |
tcb_default_styles | filter | $styles (array) | Filter default element styles |
tcb_extra_fonts_css | action | (none) | Inject custom fonts CSS |
tve_should_minify_css | filter | $minify (bool) | Enable or disable CSS minification |
Access Control
| Hook | Type | Parameters | Description |
|---|
tcb_user_can_edit | filter | $can_edit (bool) | Control whether user can edit with Architect |
tcb_user_has_plugin_edit_cap | filter | $has_cap (bool) | Control plugin editing capability |
tcb_post_editable | filter | $editable (bool) | Control whether a post can be edited |
tcb_post_types | filter | $types (array) | Filter supported post types |
tcb_skip_license_check | filter | $skip (bool) | Bypass license requirement |
tcb_can_use_landing_pages | filter | $can_use (bool) | Control landing page access |
Thrive Theme Builder
Template System
| Hook | Type | Parameters | Description |
|---|
theme_template_before_render | action | $template (Thrive_Template) | Fires before template rendering begins |
before_theme_builder_template_render | action | $post_id (int) | Fires before theme builder template renders |
after_theme_builder_template_render | action | $post_id (int) | Fires after theme builder template renders |
theme_after_body_open | action | (none) | Fires immediately after opening body tag |
theme_before_body_close | action | (none) | Fires before closing body tag |
thrive_theme_template_content | filter | $html (string), $template | Filter complete template HTML output |
thrive_template_structure | filter | $structure (array), $template | Modify template HTML structure before rendering |
thrive_template_{type}_content | filter | $content (string) | Modify template section content (header, footer, content) |
thrive_template_{type}_before | filter | $content (string) | Add content before template section |
thrive_template_{type}_after | filter | $content (string) | Add content after template section |
thrive_template_render_{type} | filter | $render (bool) | Control rendering of specific template section |
thrive_theme_default_templates | filter | $templates (array), $args | Modify default templates list |
thrive_template_default_values | filter | $args (array) | Filter default template configuration values |
thrive_theme_template_url | filter | $url, $template, $primary, $secondary, $variable | Modify template edit or preview URLs |
thrive_theme_do_the_post | filter | $do_post (bool) | Control whether wp_post hook is called for singular pages |
| Hook | Type | Parameters | Description |
|---|
thrive_theme_section_html | filter | $html (string), $section | Modify section HTML output |
thrive_theme_section_default_content | filter | $content, $section, $type | Provide default content for new sections |
thrive_theme_rest_section_before_insert | filter | $section (array) | Filter section data before database insert |
thrive_hf_section | filter | $data (array), $type (string) | Modify header or footer section data |
thrive_hf_class | filter | $class (string), $type (string) | Filter CSS classes for header or footer |
thrive_theme_header_path | filter | $path (string), $template | Override header file path |
thrive_theme_footer_path | filter | $path (string), $template | Override footer file path |
Skins and Styling
| Hook | Type | Parameters | Description |
|---|
theme_after_skin_insert | action | $skin_id (int), $source_skin_id (int) | Fires after new skin is created |
theme_default_skin_created | action | $skin_id (int) | Fires after default skin is created for theme |
theme_update_master_hsl | action | $master_variables (array) | Fires when master color palette HSL values are updated |
thrive_theme_override_skin | filter | $skin (Thrive_Skin) | Replace or override a skin object |
thrive_css_file_content | filter | $style, $filename, $skin | Modify CSS file content for skins |
thrive_theme_deny_create_default_skin | filter | $deny (bool) | Control whether default skin auto-creation is allowed |
Breadcrumbs
| Hook | Type | Parameters | Description |
|---|
thrive_theme_breadcrumbs_root_items | filter | $items (array), $index, $in_editor | Modify root breadcrumb items |
thrive_theme_allowed_taxonomies_in_breadcrumbs | filter | $taxonomies (array), $post_type | Control which taxonomies appear in breadcrumbs |
thrive_breadcrumb_post_link | filter | $link (string), $ancestor_id | Modify ancestor post links in breadcrumbs |
thrive_theme_breadcrumbs_archive_title | filter | $title (string or null) | Custom archive title in breadcrumbs |
thrive_theme_breadcrumbs_labels | filter | $labels (array) | Filter breadcrumb label strings |
Content Types and Queries
| Hook | Type | Parameters | Description |
|---|
thrive_theme_content_types | filter | $types (array), $context (string) | Filter content types available in context |
thrive_ignored_post_types | filter | $types (array) | Filter post types excluded from theme |
thrive_ignore_taxonomies | filter | $taxonomies (array) | Filter taxonomies excluded from theme |
thrive_theme_query_vars | filter | $query_vars (array) | Filter custom query variables |
thrive_theme_should_filter_pre_get_posts | filter | $filter (bool), $query (WP_Query) | Control post list query filtering |
thrive_theme_visibility_config | filter | $config (array) | Filter template visibility rules configuration |
thrive_theme_scripts_post_types | filter | $post_types (array) | Filter post types that enqueue theme scripts |
Post Formats and Media
| Hook | Type | Parameters | Description |
|---|
thrive_theme_post_thumbnail | filter | $image (string), $post_id, $post_type | Modify post thumbnail output |
thrive_theme_post_thumbnail_url | filter | $url (string), $post_id, $post_type | Modify post thumbnail URL |
thrive_theme_dynamic_video | filter | $html (string) | Filter dynamic video output |
thrive_theme_dynamic_audio | filter | $content (string) | Filter dynamic audio output |
thrive_theme_video_post_type | filter | $type (string), $post_id | Modify video post format type |
Configuration
| Hook | Type | Parameters | Description |
|---|
thrive_theme_display_css | filter | $display (bool) | Control whether theme CSS is displayed |
thrive_theme_use_inline_css | filter | $use_inline (bool) | Control whether CSS is inlined vs external |
thrive_html_class | filter | $classes (array) | Filter root HTML element classes |
thrive_body_class | filter | $class (string), $post | Filter body CSS classes for post |
ttb_branding | filter | $html (string) | Customize TTB branding icon |
thrive_theme_allow_architect_switch | filter | $allow (bool) | Control whether architect editor link appears |
Thrive Dashboard
User Authentication
| Hook | Type | Parameters | Description |
|---|
thrive_core_user_login | action | $user_id, $user_login, $user (WP_User) | Fires when user logs in via Thrive Dashboard |
thrive_register_form_through_wordpress_user | action | $user_id (int), $data (array) | Fires when user registers via WordPress form integration |
tve_get_current_user_id | filter | $user_id (int) | Filter current user ID retrieval |
thrive_dashboard_extra_user_data | filter | $user_details (array) | Add extra user data fields |
Product Management
| Hook | Type | Parameters | Description |
|---|
thrive_dashboard_loaded | action | (none) | Fires after Dashboard is loaded, before products initialize |
tve_dash_installed_products | filter | $products (array) | Filter list of installed Thrive products |
thrive_has_access_{product} | filter | $has_access (bool) | Filter product access capability checks (dynamic suffix) |
tve_dash_features | filter | $features (array) | Filter which features are enabled |
tve_dash_admin_product_menu | filter | $menus (array) | Filter product admin menu items |
| Hook | Type | Parameters | Description |
|---|
tve_filter_api_types | filter | $api_types (array) | Filter available autoresponder API types |
tve_filter_available_connection | filter | $available (array) | Filter available autoresponder connections |
thrive_api_email_message | filter | $message (string), $args (array) | Modify complete email message before sending |
thrive_email_message_field | filter | $value (string), $field, $args | Modify email message field values |
tve_dash_email_data | filter | $data (array), $arguments (array) | Filter email connection data |
| Hook | Type | Parameters | Description |
|---|
tve_dash_cache_known_plugins | filter | $plugins (array) | Filter known cache plugin list |
tve_dash_cache_clear_callback | filter | $callback, $cache_plugin | Filter cache clearing function for plugin |
thrive_transient_expiration_{transient} | filter | $expiration (int) | Filter specific transient expiration time |
Webhooks and REST API
| Hook | Type | Parameters | Description |
|---|
tve_dash_webhook_trigger | filter | $id, $code, $data (array) | Filter webhook trigger execution |
tve_dash_main_ajax_{key} | filter | $response (array), $data (array) | Filter AJAX response data per action key |
tve_dash_frontend_ajax_response | filter | $response (array) | Filter complete frontend AJAX response |
Indexing and SEO
| Hook | Type | Parameters | Description |
|---|
tve_dash_should_index_page | filter | $should_index (bool) | Control whether current page should be indexed |
tve_dash_exclude_post_types_from_index | filter | $post_types (array) | Filter post types excluded from search indexing |
tve_dash_yoast_sitemap_exclude_post_types | filter | $post_types (array) | Filter post types excluded from Yoast sitemap |
WooCommerce Integration
| Hook | Type | Parameters | Description |
|---|
thrive_woo_product_purchase_completed | action | $product, $user, $billing_email | WooCommerce purchase completes |
thrive_woo_product_purchase_processing | action | $product, $user, $billing_email | WooCommerce purchase begins processing |
thrive_woo_product_refund | action | $product, $user, $billing_email | WooCommerce product is refunded |
Thrive Leads
| Hook | Type | Parameters | Description |
|---|
tve_leads_delete_post | action | $post_id (int) | Lead form or post is deleted |
tve_leads_ajax_load_prepare_variation | action | $variation (array), $form_type (WP_Post) | Prepare scripts when lazy-loading form variations |
tve_leads_allow_shortcodes | filter | $allow (bool) | Control whether Thrive Leads shortcodes are registered |
thrive_leads_skip_request | filter | $skip (bool) | Short-circuit Thrive Leads display checks for current request |
thrive_leads_post_types_blacklist | filter | $blacklist (array) | Define post types where Thrive Leads should not display |
thrive_leads_is_page | filter | $is_page (bool) | Filter page detection logic |
thrive_leads_current_post | filter | $post (WP_Post) | Filter current post for lead group targeting |
tve_leads_do_not_show_two_step | filter | $hide (bool), $form_id | Conditionally hide two-step lightbox forms |
Lazy Loading and AJAX
| Hook | Type | Parameters | Description |
|---|
tve_leads_lazy_load_forms | filter | $lazy_load (bool) | Enable or disable AJAX lazy-loading of forms |
tve_leads_ajax_load | filter | $ajax_load (bool) | Determine if forms load via AJAX on DOM ready |
tve_leads_ajax_load_forms | filter | $response (array) | Filter complete AJAX response for lazy-loaded forms |
tve_leads_append_states_ajax | filter | $variations (array) | Filter AJAX-loaded variations before response |
Variation States
| Hook | Type | Parameters | Description |
|---|
tve_leads_variation_append_states | filter | $html (string), $variation (array) | Append custom HTML or states to form variations |
tve_frontend_options_data | filter | $frontend_options (array) | Filter frontend JavaScript options (shared across products) |
Thrive Quiz Builder
Quiz Lifecycle
| Hook | Type | Parameters | Description |
|---|
thrive_quizbuilder_quiz_completed | action | $quiz_details, $user_data, $form_data, $post_id | Quiz completion finalized — integrate with CRM, email, analytics |
thrive_quizbuilder_quiz_restarted | action | $quiz_details, $user_details | User restarts a quiz |
thrive_quizbuilder_answer_submitted | action | $quiz_details, $answer_data, $user_details | Individual question answer submitted |
Example — Send quiz results to external service:
add_action( 'thrive_quizbuilder_quiz_completed', function( $quiz, $user, $form, $post_id ) {
// $quiz contains quiz_id, quiz_title, result
// $user contains user details
// $form contains form submission data
wp_remote_post( 'https://your-api.com/quiz-results', [
'body' => json_encode( [
'quiz_id' => $quiz['quiz_id'],
'result' => $quiz['result'],
'email' => $user['email'] ?? '',
] ),
] );
}, 10, 4 );
Thrive Ultimatum
Campaign Events
| Hook | Type | Parameters | Description |
|---|
thrive_ultimatum_evergreen_campaign_start | action | $campaign_data, $user_data | Evergreen countdown campaign starts for a user |
tve_ult_action_impression | action | $campaign (WP_Post) | Campaign impression recorded (non-crawler traffic) |
thrive_ult_can_display_campaign | filter | $can_display (bool) | Control whether campaigns should display |
thrive_ult_js_localize | filter | $frontend_data (array) | Filter frontend JavaScript localization data |
Example — Sync campaign start with external system:
add_action( 'thrive_ultimatum_evergreen_campaign_start', function( $campaign, $user ) {
// $campaign contains campaign ID, end time, etc.
// Sync countdown with your email platform
}, 10, 2 );
Display Control
| Hook | Type | Parameters | Description |
|---|
tve_ult_body_end_html | filter | $html (string) | Append custom HTML before closing body tag |
tve_ultimatum_ajax_load_forms | filter | $response (array) | Filter AJAX response for lazy-loaded campaigns |
tve_ult_shortcode_render_exception | filter | $exception (bool) | Bypass shortcode render exception handling |
tve_ult_settings_post_types_blacklist | filter | $blacklist (array) | Blacklist post types from campaign targeting |
tve_ult_accepted_admin_pages | filter | $pages (array) | Define which admin pages display Ultimatum UI |
Thrive Ovation
Testimonial Lifecycle
| Hook | Type | Parameters | Description |
|---|
thrive_ovation_testimonial_submit | action | $testimonial_details, $user | Testimonial submitted by user |
thrive_ovation_testimonial_ready | action | $testimonial_details, $user_details | Testimonial approved and ready for display |
thrive_ovation_testimonial_rejected | action | $testimonial_details, $user_details | Testimonial rejected by admin |
Example — Notify on testimonial approval:
add_action( 'thrive_ovation_testimonial_ready', function( $testimonial, $user ) {
// Send thank-you email or publish to social media
wp_mail( $user['email'], 'Your testimonial is live!', 'Thank you for your feedback.' );
}, 10, 2 );
Thrive Automator
Initialization and Data Objects
| Hook | Type | Parameters | Description |
|---|
thrive_automator_init | action | (none) | Fires after Thrive Automator initializes — register custom triggers here |
thrive_automator_process_data_object_{id} | filter | $data_object, $raw_data, $data_object_id | Modify specific data object types before automation triggers |
thrive_automator_data_object_{id}_fields | filter | $fields (array) | Modify available fields on a data object type |
thrive_automator_filter_duplicate_meta | filter | $meta, $new_id, $old_id | Filter post meta when duplicating an automation |
Parameter Reference
Common Parameter Shapes
$user_details (array) — Used across Apprentice lifecycle hooks:
ID — WordPress user IDuser_login — Usernameuser_email — Email addressdisplay_name — Display name
$course_details (array) — Course lifecycle hooks:
course_id — Course term IDcourse_title — Course name
$lesson_details (array) — Lesson lifecycle hooks:
lesson_id — Lesson post IDlesson_title — Lesson namecourse_id — Parent course ID
$module_details (array) — Module lifecycle hooks:
module_id — Module IDmodule_title — Module namecourse_id — Parent course ID
$form_data (array) — Lead generation hooks:
email — Submitted email addressname — Submitted name- Additional custom fields as key-value pairs
Best Practices
- Use a child theme or custom plugin. Add your custom hooks to a child theme’s
functions.php or create a site-specific plugin. Never edit core plugin files directly. - Prefix your functions. Use prefixes like
mycompany_ or client_ to avoid naming conflicts with other plugins. - Set priority and parameter count. Always specify the priority (default 10) and the number of accepted parameters when hooking into actions and filters. For example:
add_action( 'hook_name', 'my_function', 10, 2 ). - Return filtered values. When using
add_filter(), always return a value. Forgetting to return will result in null data. - Test in staging first. Always test your custom hooks on a staging site before deploying to production.