Search Documentation

WP Travel Developer Documentation

  1. Home
  2. Docs
  3. WP Travel Developer Documentation
  4. Filters Associated With Single Itinerary Page
  5. Filter :wp_travel_available_pax

Filter :wp_travel_available_pax

Filter to add trip custom data.

Source

File: /core/helpers/trips.php
Used by: /core/helpers/trips.php

Parameters
$trip_data, $trip->ID

Example:

function prefix_wp_travel_trip_data( $trip_data, $trip_id ) {
    $trip_data[‘custom_data’] = ‘Hello World’;
    return $trip_data;
}
add_filter( 'wp_travel_trip_data', 'prefix_wp_travel_trip_data', 12, 2 );

Was this article helpful to you? Yes No

How can we help?