Skip to content

Trip Reviews

[trip_rating_summary] Shortcode

Updated July 31, 2026 6 min read

Public WordPress hooks for customizing InquiryFlow Pro: Trip Builder, follow-ups, CRM, exit-intent, conversion tracking, and analytics. Use in a child theme or custom plugin.

Requires InquiryFlow Free + Pro. See Free developer documentation for shared hooks.

Internal hooks (licensing store URLs, admin script localize) are omitted.


Exit intent

inquiryflow_pro_exit_intent_display (filter)

Control whether exit-intent is allowed on the current request (after trip-singular check).

Parameters: bool $show

add_filter( 'inquiryflow_pro_exit_intent_display', function ( $show ) {
    return $show && ! is_user_logged_in();
} );

inquiryflow_pro_exit_intent_should_enqueue (filter)

Control whether exit-intent scripts and styles load.

Parameters: bool $enqueue

add_filter( 'inquiryflow_pro_exit_intent_should_enqueue', function ( $enqueue ) {
    return $enqueue && ! wp_is_mobile();
} );

Trip Builder

inquiryflow_pro_trip_builder_definition (filter)

Modify the full Trip Builder definition (steps, fields, branding) before use.

Parameters: array $definition, ?Core $core

add_filter( 'inquiryflow_pro_trip_builder_definition', function ( $definition, $core ) {
    $definition['branding']['brand_color'] = '#0F766E';
    return $definition;
}, 10, 2 );

inquiryflow_pro_trip_builder_enabled_steps (filter)

Filter which steps are active in the wizard.

Parameters: array $steps, array $definition

add_filter( 'inquiryflow_pro_trip_builder_enabled_steps', function ( $steps, $definition ) {
    return array_values( array_filter( $steps, function ( $step ) {
        return 'budget' !== ( $step['id'] ?? '' );
    } ) );
}, 10, 2 );

inquiryflow_pro_trip_builder_page_ids (filter)

Page IDs treated as Trip Builder pages (FAB hidden, auto-detect).

Parameters: array $ids, Core $core

add_filter( 'inquiryflow_pro_trip_builder_page_ids', function ( $ids, $core ) {
    $ids[] = 123;
    return $ids;
}, 10, 2 );

inquiryflow_pro_trip_builder_shortcode_html (filter)

Replace or wrap shortcode/block HTML output.

Parameters: string $html, Core $core

add_filter( 'inquiryflow_pro_trip_builder_shortcode_html', function ( $html, $core ) {
    return '<div class="my-trip-builder-wrap">' . $html . '</div>';
}, 10, 2 );

inquiryflow_pro_trip_builder_validate_submission (filter)

Add validation before Trip Builder submission is accepted. Return WP_Error to reject.

Parameters: ?\WP_Error $error, array $params, Core $core

add_filter( 'inquiryflow_pro_trip_builder_validate_submission', function ( $error, $params, $core ) {
    if ( empty( $params['answers']['budget'] ) ) {
        return new \WP_Error( 'budget_required', 'Please select a budget tier.' );
    }
    return $error;
}, 10, 3 );

inquiryflow_pro_trip_builder_lead_data (filter)

Modify lead row data before insert from Trip Builder.

Parameters: array $lead_data, array $params, Core $core

add_filter( 'inquiryflow_pro_trip_builder_lead_data', function ( $lead_data, $params, $core ) {
    $lead_data['lead_type'] = 'trip_builder';
    return $lead_data;
}, 10, 3 );

inquiryflow_pro_trip_builder_submitted (action)

Fires after a Trip Builder lead is saved.

Parameters: Lead $lead, array $params

add_action( 'inquiryflow_pro_trip_builder_submitted', function ( $lead, $params ) {
    // Custom webhook.
}, 10, 2 );

inquiryflow_pro_trip_builder_brief_rows (filter)

Modify question/answer rows shown in inbox and emails.

Parameters: array $rows, Lead $lead

add_filter( 'inquiryflow_pro_trip_builder_brief_rows', function ( $rows, $lead ) {
    $rows[] = array( 'label' => 'Campaign', 'value' => 'summer-2026' );
    return $rows;
}, 10, 2 );

inquiryflow_pro_trip_builder_admin_email_rows (filter)

Deprecated alias of inquiryflow_pro_trip_builder_brief_rows for admin email context.

Parameters: array $rows, Lead $lead

add_filter( 'inquiryflow_pro_trip_builder_admin_email_rows', function ( $rows, $lead ) {
    return apply_filters( 'inquiryflow_pro_trip_builder_brief_rows', $rows, $lead );
}, 10, 2 );

Automated follow-ups

inquiryflow_pro_should_schedule_followups (filter)

Opt out of scheduling follow-ups for a specific lead.

Parameters: bool $schedule, Lead $lead

add_filter( 'inquiryflow_pro_should_schedule_followups', function ( $schedule, $lead ) {
    return $schedule && 'partner' !== $lead->source;
}, 10, 2 );

inquiryflow_pro_followup_should_send_instant (filter)

Skip instant thank-you for a lead.

Parameters: bool $send, Lead $lead

add_filter( 'inquiryflow_pro_followup_should_send_instant', function ( $send, $lead ) {
    return $send;
}, 10, 2 );

inquiryflow_pro_followup_should_send_delayed (filter)

Skip delayed follow-up for a lead.

Parameters: bool $send, Lead $lead

add_filter( 'inquiryflow_pro_followup_should_send_delayed', function ( $send, $lead ) {
    return $send && ! str_contains( $lead->email, '@test.com' );
}, 10, 2 );

inquiryflow_pro_followup_delay_seconds (filter)

Override delay before delayed email (default: days setting × DAY_IN_SECONDS).

Parameters: int $delay, Lead $lead

add_filter( 'inquiryflow_pro_followup_delay_seconds', function ( $delay, $lead ) {
    return 3 * DAY_IN_SECONDS;
}, 10, 2 );

inquiryflow_pro_followup_tokens (filter)

Add or change template tokens for follow-up emails.

Parameters: array $tokens, Lead $lead — token => replacement string

add_filter( 'inquiryflow_pro_followup_tokens', function ( $tokens, $lead ) {
    $tokens['{agent_name}'] = 'Alex';
    return $tokens;
}, 10, 2 );

inquiryflow_email_template (filter)

Override follow-up subject/body. Contexts: followup_instant_subject, followup_instant_body, followup_delayed_subject, followup_delayed_body. Also used for Free admin emails.

Parameters: string $text, string $context, Lead $lead

add_filter( 'inquiryflow_email_template', function ( $text, $context, $lead ) {
    if ( 'followup_delayed_subject' === $context ) {
        return 'Still thinking about ' . $lead->trip_title . '?';
    }
    return $text;
}, 10, 3 );

inquiryflow_pro_followup_sent (action)

Fires after a follow-up email is sent.

Parameters: int $lead_id, string $type (instant|delayed), string $to

add_action( 'inquiryflow_pro_followup_sent', function ( $lead_id, $type, $to ) {
    error_log( "Follow-up {$type} sent for lead {$lead_id}" );
}, 10, 3 );

inquiryflow_pro_followup_unsubscribed (action)

Fires when a visitor unsubscribes from delayed follow-ups.

Parameters: Lead $lead

add_action( 'inquiryflow_pro_followup_unsubscribed', function ( $lead ) {
    // Log or sync to CRM.
} );

inquiryflow_pro_followup_scheduled (action)

Fires when follow-up jobs are queued for a lead.

Parameters: int $lead_id

add_action( 'inquiryflow_pro_followup_scheduled', function ( $lead_id ) {
    // Audit log.
} );

CRM sync

inquiryflow_pro_should_schedule_crm (filter)

Skip CRM sync scheduling for a lead.

Parameters: bool $schedule, Lead $lead

add_filter( 'inquiryflow_pro_should_schedule_crm', function ( $schedule, $lead ) {
    return $schedule && ! empty( $lead->email );
}, 10, 2 );

inquiryflow_pro_crm_provider_for_lead (filter)

Force a CRM provider per lead (overrides global setting).

Parameters: string $provider, Lead $lead

add_filter( 'inquiryflow_pro_crm_provider_for_lead', function ( $provider, $lead ) {
    if ( 'trip_builder' === $lead->source ) {
        return 'hubspot';
    }
    return $provider;
}, 10, 2 );

inquiryflow_pro_integrations (filter)

Register additional CRM connector instances.

Parameters: array $integrations

add_filter( 'inquiryflow_pro_integrations', function ( $integrations ) {
    $integrations[] = new My_Custom_Crm_Connector();
    return $integrations;
} );

inquiryflow_pro_crm_contact (filter)

Modify contact payload before provider-specific filters.

Parameters: array $contact, Lead $lead, string $provider

add_filter( 'inquiryflow_pro_crm_contact', function ( $contact, $lead, $provider ) {
    $contact['custom_field'] = 'enterprise';
    return $contact;
}, 10, 3 );

inquiryflow_pro_crm_contact_mapped (filter)

Modify contact after default mapping from lead.

Parameters: array $contact, Lead $lead

add_filter( 'inquiryflow_pro_crm_contact_mapped', function ( $contact, $lead ) {
    $contact['tags'][] = 'website-lead';
    return $contact;
}, 10, 2 );

inquiryflow_pro_{provider}_crm_contact (filter)

Provider-specific contact filter. Example: inquiryflow_pro_hubspot_crm_contact.

Parameters: array $contact, Lead $lead

add_filter( 'inquiryflow_pro_hubspot_crm_contact', function ( $contact, $lead ) {
    $contact['lifecyclestage'] = 'lead';
    return $contact;
}, 10, 2 );

inquiryflow_pro_fluentcrm_contact (filter)

FluentCRM compatibility alias.

Parameters: array $contact, Lead $lead

add_filter( 'inquiryflow_pro_fluentcrm_contact', function ( $contact, $lead ) {
    $contact['status'] = 'subscribed';
    return $contact;
}, 10, 2 );

inquiryflow_pro_crm_sync_before (action)

Before API call to CRM.

Parameters: int $lead_id, string $provider, array $contact

add_action( 'inquiryflow_pro_crm_sync_before', function ( $lead_id, $provider, $contact ) {
    // Log payload.
}, 10, 3 );

inquiryflow_pro_crm_synced (action)

After successful CRM sync.

Parameters: int $lead_id, string $provider

add_action( 'inquiryflow_pro_crm_synced', function ( $lead_id, $provider ) {
    update_post_meta( $lead_id, '_crm_synced', time() );
} );

inquiryflow_pro_crm_sync_failed (action)

After sync exception.

Parameters: int $lead_id, string $provider, \Exception $e

add_action( 'inquiryflow_pro_crm_sync_failed', function ( $lead_id, $provider, $e ) {
    error_log( $e->getMessage() );
}, 10, 3 );

Conversion tracking

inquiryflow_pro_conversion_lead_matched (action)

Payment matched to a lead; status set to Booked.

Parameters: Lead $lead, int $trip_id, mixed $payment

add_action( 'inquiryflow_pro_conversion_lead_matched', function ( $lead, $trip_id, $payment ) {
    // Notify Slack.
}, 10, 3 );

inquiryflow_pro_conversion_inferred (action)

Departure fallback recorded a conversion event (status unchanged).

Parameters: int $lead_id, int $trip_id

add_action( 'inquiryflow_pro_conversion_inferred', function ( $lead_id, $trip_id ) {
    // Analytics bridge.
}, 10, 2 );

inquiryflow_pro_conversion_find_lead (filter)

Override lead lookup for payment matching.

Parameters: ?Lead $lead, string $email, int $trip_id

add_filter( 'inquiryflow_pro_conversion_find_lead', function ( $lead, $email, $trip_id ) {
    // Return custom Lead object or null to use default.
    return $lead;
}, 10, 3 );

inquiryflow_pro_payment_lead_email (filter)

Email used when matching payment to lead.

Parameters: string $email, mixed $payment

add_filter( 'inquiryflow_pro_payment_lead_email', function ( $email, $payment ) {
    return strtolower( trim( $email ) );
}, 10, 2 );

inquiryflow_pro_payment_trip_id (filter)

Trip ID used when matching payment to lead.

Parameters: int $trip_id, mixed $payment

add_filter( 'inquiryflow_pro_payment_trip_id', function ( $trip_id, $payment ) {
    return $trip_id;
}, 10, 2 );

inquiryflow_pro_conversion_departure_buffer_days (filter)

Override buffer days for departure fallback scan.

Parameters: int $days

add_filter( 'inquiryflow_pro_conversion_departure_buffer_days', function ( $days ) {
    return 14;
} );

inquiryflow_pro_trip_departure_timestamp (filter)

Override departure timestamp for a trip.

Parameters: int $timestamp, int $trip_id

add_filter( 'inquiryflow_pro_trip_departure_timestamp', function ( $timestamp, $trip_id ) {
    return $timestamp;
}, 10, 2 );

Analytics

inquiryflow_pro_analytics_data (filter)

Modify analytics API response before admin UI renders.

Parameters: array $data, int $days

add_filter( 'inquiryflow_pro_analytics_data', function ( $data, $days ) {
    $data['custom_note'] = 'Filtered by marketing';
    return $data;
}, 10, 2 );