gpaa_travel_estimate_template

  1. Description
  2. Usage
  3. Parameters
  4. Since

Description

Filter the template used to render a Travel Estimate field’s content. Use the {distance} and {time} tags to control the order and wording, e.g. “{time} ({distance})”. Only reference estimates that are active for the field’s Estimate Type. A tag for an inactive estimate renders empty, so surrounding literals (such as brackets) would remain.

Usage

Applied globally

add_filter( 'gpaa_travel_estimate_template', 'my_custom_function' );

Applied to specific form

add_filter( 'gpaa_travel_estimate_template_FORMID', 'my_custom_function' );

Parameters

$template string

The content template.

$field GP_Travel_Estimate_Field

The current field.

Since

  • 2.0.0 Hook added.