Action: wp_travel_update_trip_data #

Fires after updating minimum trip price and before saving trip data.

Active Since:  v4.0.4

Source

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

Parameters
$trip_data, $trip_id

Example:

function prefix_wp_travel_update_trip_data( $trip_data, $trip_id ) {
    error_log(‘I am called here before saving trip data’);
}
add_action( 'wp_travel_update_trip_data', 'prefix_wp_travel_update_trip_data'  );

Action: wp_travel_booking_before_form_field #

Fires before checkout booking form field.

Source

File: /inc/booking-functions.php
Used by: /inc/booking-functions.php

Example:

function prefix_wp_travel_booking_before_form_field() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_booking_before_form_field', 'prefix_wp_travel_booking_before_form_field'  );

Action: wp_travel_booking_after_form_field #

Fires after checkout booking form field.

Source

File: /inc/booking-functions.php
Used by: /inc/booking-functions.php

Example:

function prefix_wp_travel_booking_after_form_field() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_booking_after_form_field', 'prefix_wp_travel_booking_after_form_field'  );

Action: wp_travel_after_booking_data_save #

Fires after updating and saving data of order items. Currently using for updating payment status.

Active Since v2.0.0

Source

File: /inc/booking-functions.php
Used by: /inc/booking-functions.php

Parameters
$booking_id

Example:

function prefix_wp_travel_after_booking_data_save( $booking_id ) {
    if ( ! $booking_id ) {
        return;
    }
    $payment_id = wp_travel_get_payment_id( $booking_id );
    if ( $payment_id ) {
        $payment_status = isset( $_POST['wp_travel_payment_status'] ) ? $_POST['wp_travel_payment_status'] : 'N/A';
        update_post_meta( $payment_id, 'wp_travel_payment_status', $payment_status );
    }
}
add_action( 'wp_travel_after_booking_data_save', 'prefix_wp_travel_after_booking_data_save'  );

Action : wp_travel_after_frontend_booking_save #

Hook used to add payment and its info.

Active Since v1.0.5

Source

File: /inc/booking-functions.php
Used by: /inc/booking-functions.php

Parameters
$booking_id, $first_key

Example:

function prefix_wp_travel_after_frontend_booking_save( $booking_id, $first_key ) {
    if ( ! $booking_id ) {
        return;
    }
    $gateway = isset( $_POST['wp_travel_payment_gateway'] ) ? $_POST['wp_travel_payment_gateway'] : '';
    if ( 'bank_deposit' === $gateway ) {
        $payment_id = wp_travel_get_payment_id( $booking_id );
        $payment_mode = get_post_meta( $payment_id, 'wp_travel_payment_mode', true );
        update_post_meta( $booking_id, 'wp_travel_booking_status', 'booked' );
        update_post_meta( $payment_id, 'wp_travel_payment_status', 'waiting_voucher' );
    }
}
add_action( 'wp_travel_after_frontend_booking_save', 'prefix_wp_travel_after_frontend_booking_save'  );

Action: wp_travel_before_stat_toolbar_fields #

Fire before statistic toolbar fields on booking chart.

Active Since v1.0.6

Source

File: /inc/booking-functions.php
Used by: /inc/booking-functions.php

Example:

function prefix_wp_travel_before_stat_toolbar_fields() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_before_stat_toolbar_fields', 'prefix_wp_travel_before_stat_toolbar_fields'  );

Action: wp_travel_after_stat_toolbar_fields #

Fire after statistic toolbar fields on booking chart.

Active Since v1.0.6

Source

File: /inc/booking-functions.php
Used by: /inc/booking-functions.php

Example:

function prefix_wp_travel_after_stat_toolbar_fields() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_after_stat_toolbar_fields', 'prefix_wp_travel_after_stat_toolbar_fields'  );

Action: wp_travel_deactivated #

Hook for WP Travel deactivation callback.

Active Since v1.0.0

Source

File: /inc/class-install.php
Used by: /inc/class-install.php

Example:

function prefix_wp_travel_deactivated() {
    // Code here.
}
add_action( 'wp_travel_deactivated', 'prefix_wp_travel_deactivated'  );

Action: wp_travel_save_billing_details #

Fire after updating customer billing details.

Source

File: /inc/class-wp-travel-form-handler.php
Used by: /inc/class-wp-travel-form-handler.php

Parameters
$user_id

Example:

function prefix_wp_travel_save_billing_details( $user_id ) {
    // Code here.
}
add_action( 'wp_travel_save_billing_details', 'prefix_wp_travel_save_billing_details'  );

Action: wp_travel__save_account_details #

Fire after updating customer account details.

Source

File: /inc/class-wp-travel-form-handler.php
Used by: /inc/class-wp-travel-form-handler.php

Parameters
$user->ID

Example:

function prefix_wp_travel__save_account_details( $user->ID ) {
    // Code here.
}
add_action( 'wp_travel__save_account_details', 'prefix_wp_travel__save_account_details'  );

Action: wp_travel_before_post_filter #

Fires before WP Travel post filter.

Source

File: /inc/template-functions.php
Used by: /inc/template-functions.php

Example:

function prefix_wp_travel_before_post_filter() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_before_post_filter', 'prefix_wp_travel_before_post_filter'  );

Action: wp_travel_after_post_filter #

Fires after WP Travel post filter.

Source

File: /inc/template-functions.php
Used by: /inc/template-functions.php

Example:

function prefix_wp_travel_after_post_filter() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_after_post_filter', 'prefix_wp_travel_after_post_filter'  );

Action: wp_travel_action_after_itinerary_date #

Fires after itinerary date on frontend.

Active Since v3.0.8

Source

File: /inc/template-functions.php
Used by: /inc/template-functions.php

Parameters
$trip_id, $pricing

Example:

function prefix_wp_travel_action_after_itinerary_date( $trip_id, $pricing ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_action_after_itinerary_date', 'prefix_wp_travel_action_after_itinerary_date'  );

Action: wp_travel_created_customer #

Fire after the customer account creation.

Source

File: /inc/wp-travel-user-functions.php
Used by: /inc/wp-travel-user-functions.php

Parameters
$customer_id, $new_customer_data, $password_generated

Example:

function prefix_wp_travel_created_customer( $customer_id, $new_customer_data, $password_generated ) {
    // Code here.
}
add_action( 'wp_travel_created_customer', 'prefix_wp_travel_created_customer'  );

Action: wp_travel_critical_admin_notice #

Hook to display critical admin notices.

Source

File: /inc/admin-notices.php
Used by: /inc/admin-notices.php

Example:

function prefix_wp_travel_critical_admin_notice() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_critical_admin_notice', 'prefix_wp_travel_critical_admin_notice'  );

Action: wp_travel_general_admin_notice #

Hook to display general admin notices.

Source

File: /inc/admin-notices.php
Used by: /inc/admin-notices.php

Example:

function prefix_wp_travel_general_admin_notice() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_general_admin_notice', 'prefix_wp_travel_general_admin_notice'  );

Action: wp_travel_itinerary_extra_meta_save #

Fire after saving trip metas.

Source

File: /inc/class-admin-metaboxes.php
Used by: /inc/class-admin-metaboxes.php

Parameter
$post_id

Example:

function prefix_wp_travel_itinerary_extra_meta_save( $post_id ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_itinerary_extra_meta_save', 'prefix_wp_travel_itinerary_extra_meta_save'  );

Action: wp_travel_admin_map_area #

Fire in WP Travel trip admin map area.

Active Since v2.0.0

Source

File: /inc/admin/views/tabs/tabs-contents/itineraries/locations.php
Used by: /inc/admin/views/tabs/tabs-contents/itineraries/locations.php

Parameter
$settings, $map_data

Example:

function prefix_wp_travel_admin_map_area( $settings, $map_data ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_admin_map_area', 'prefix_wp_travel_admin_map_area’ );

Action: wp_travel_after_trip_duration_fields #

Fire after WP Travel trip admin trip duration fields.

Source

File: /inc/admin/views/tabs/tabs-contents/itineraries/price.php
Used by: /inc/admin/views/tabs/tabs-contents/itineraries/price.php

Parameter
$args

Example:

function prefix_wp_travel_after_trip_duration_fields( $args ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_after_trip_duration_fields', 'prefix_wp_travel_after_trip_duration_fields’ );

Action: wp_travel_before_minimum_partial_payout #

Fire before WP Travel admin minimum partial payout.

Active Since v3.0.7

Source

File: /inc/admin/views/tabs/tabs-contents/settings/payment.php
Used by: /inc/admin/views/tabs/tabs-contents/settings/payment.php

Parameters
$settings

Example:

function prefix_wp_travel_before_minimum_partial_payout( $settings ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_before_minimum_partial_payout', 'prefix_wp_travel_before_minimum_partial_payout’ );

Action: wp_travel_after_minimum_partial_payout #

Fire after WP Travel admin minimum partial payout.

Active Since v3.0.7

Source

File: /inc/admin/views/tabs/tabs-contents/settings/payment.php
Used by: /inc/admin/views/tabs/tabs-contents/settings/payment.php

Parameters
$settings

Example:

function prefix_wp_travel_after_minimum_partial_payout( $settings ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_after_minimum_partial_payout', 'prefix_wp_travel_after_minimum_partial_payout’ );

Action: wp_travel_action_before_checkout_field #

Fire in the WP Travel checkout before checkout fields.

Source

File: /inc/cart/checkout.php
Used by: /inc/cart/checkout.php

Example:

function prefix_wp_travel_action_before_checkout_field() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_action_before_checkout_field', 'prefix_wp_travel_action_before_checkout_field’ );

Action: wp_travel_action_before_billing_info_field #

Fire in the WP Travel checkout before billing fields.

Source

File: /inc/cart/checkout.php
Used by: /inc/cart/checkout.php

Example:

function prefix_wp_travel_action_before_billing_info_field() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_action_before_billing_info_field', 'prefix_wp_travel_action_before_billing_info_field’ );

Action: wp_travel_before_checkout_page_wrap #

Fire before WP Travel checkout page wrap.

Active Since v4.0.7

Source

File: /inc/cart/class-checkout.php
Used by: /inc/cart/class-checkout.php

Example:

function prefix_wp_travel_before_checkout_page_wrap() {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_before_checkout_page_wrap', 'prefix_wp_travel_before_checkout_page_wrap’ );

Action: wp_travel_verify_paypal_ipn #

Fire during WP Travel listen for $_GET request from PayPal IPN.

Source

File: /inc/gateways/standard-paypal/paypal-functionst.php
Used by: /inc/gateways/standard-paypal/paypal-functionst.php

Example:

function prefix_wp_travel_verify_paypal_ipn() {
    // Code here.
}
add_action( ‘wp_travel_verify_paypal_ipn', 'prefix_wp_travel_verify_paypal_ipn’ );

Action: wp_travel_review_before_comment_meta #

Fire before comment meta on review.

Source

File: /templates/review.php
Used by: /templates/review.php

Parameters
$comment

Example:

function prefix_wp_travel_review_before_comment_meta( $comment ) {
  esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_review_before_comment_meta', 'prefix_wp_travel_review_before_comment_meta’ );

Action: wp_travel_before_item_title #

Fire before WP Travel trip title.

Source

File: /templates/shortcode/itinerary-item.php
Used by: /templates/shortcode/itinerary-item.php

Parameters
get_the_ID()

Example:

function prefix_wp_travel_before_item_title( $post_id ) {
  esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( ‘wp_travel_before_item_title', 'prefix_wp_travel_before_item_title’ );

Powered by BetterDocs