Filters Associated With Email

Filter: wp_travel_email_travel_date #

Arrival date for email.

Active Since v3.1.3

Source

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

Parameters
$item[‘arrival_date’], $item

Example:

function prefix_wp_travel_email_travel_date( $arrval_date, $item ){
    $arrival_date = ‘ARRIVAL DATE’;
    return $arrival_date;
}
add_filter( 'wp_travel_email_travel_date', 'prefix_wp_travel_email_travel_date', 12, 2 );
function prefix_wp_travel_email_travel_date( $arrval_date, $item ){
    $arrival_date = ‘ARRIVAL DATE’;
    return $arrival_date;
}
add_filter( 'wp_travel_email_travel_date', 'prefix_wp_travel_email_travel_date', 12, 2 );

Filter: wp_travel_booking_admin_emails #

Booking admin email address.

Source

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

Parameters
$site_admin_email

Example:

function prefix_wp_travel_booking_admin_emails( $site_admin_email ){
    $site_admin_email = ‘test@test.com’;
    return $site_admin_email;
}
add_filter( 'wp_travel_booking_admin_emails', 'prefix_wp_travel_booking_admin_emails' );

Filter: wp_travel_admin_email_tags #

Email tags in the array.

Source

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

Parameters
$email_tags, $booking_id

Example:

function prefix_wp_travel_admin_email_tags( $email_tags, $booking_id ) {
    $email_tags[‘{custom_email_tag}’] = ‘value’;
    return $email_tags;
}
add_filter( 'wp_travel_admin_email_tags', 'prefix_wp_travel_admin_email_tags', 12, 2 );

Filter: wp_travel_admin_booking_email_tags #

Admin Email tags in the array.

Source

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

Parameters
$email_tags, $booking_id

Example:

function prefix_wp_travel_admin_booking_email_tags( $email_tags, $booking_id ) {
    $email_tags[‘{custom_email_tag}’] = ‘value’;
    return $email_tags;
}
add_filter( 'wp_travel_admin_booking_email_tags', 'prefix_wp_travel_admin_booking_email_tags', 12, 2 );

Filter: wp_travel_email_template_type #

WP Travel email data like header, content etc.

Active Since v1.8.0

Source

File: /inc/class-email-template.php
Used by: /inc/class-email-template.php

Parameters
$email_data, $type, $sent_to

Example:

function prefix_wp_travel_email_template_type( $email_data, $type, $sent_to ) {
    $email_data[‘header_details’][‘header_title’] = ‘Title here’;
    return $email_data;
}
add_filter( 'wp_travel_email_template_type', 'prefix_wp_travel_email_template_type', 12, 3 );

Filter: apply_filters( wp_travel_email_template, $email_template, $type, $sent_to ) #

WP Travel email data like header, content etc.

Active Since v1.8.0

Source

File: /inc/class-email-template.php
Used by: /inc/class-email-template.php

Parameters
$email_template, $type, $sent_to

Example:

function prefix_wp_travel_email_template( $email_template, $type, $sent_to ) {
    $email_template[‘mail_content’] = ‘Email Content’;
    return $email_template;
}
add_filter( 'wp_travel_email_template', 'prefix_wp_travel_email_template', 12, 3 );

Filter: wp_travel_disable_email_template_poweredby #

Power by disabling on email footer. The default is true.

Source

File: /inc/class-email-template.php
Used by: /inc/class-email-template.php

Example:

function prefix_wp_travel_disable_email_template_poweredby() {
    return true;
}
add_filter( 'wp_travel_disable_email_template_poweredby', 'prefix_wp_travel_disable_email_template_poweredby' );

Email footer text.

Source

File: /inc/class-email-template.php
Used by: /inc/class-email-template.php

Example:

function prefix_wp_travel_email_template_footer_text() {
    return ’<p> This is email footer text. </p>’;
}
add_filter( 'wp_travel_email_template_footer_text', 'prefix_wp_travel_email_template_footer_text' );

Filter: wp_travel_email_from_name #

WP Travel email from name ‘sender’.

Source

File: /inc/helpers.php
Used by: /inc/helpers.php

Parameters
$name

Example:

function prefix_wp_travel_email_from_name( $name ) {
    $name = ‘NAME HERE’;
    return $name;
}
add_filter( 'wp_travel_email_from_name', 'prefix_wp_travel_email_from_name' );

Filter: wp_travel_enquiries_admin_emails #

Trip enquiry site admin email filter.

Source

File: /inc/trip-enquiries.php
Used by: /inc/trip-enquiries.php

Parameters
$site_admin_email

Example:

function prefix_wp_travel_enquiries_admin_emails( $site_admin_email ) {
    $site_admin_email = ‘EMAIL ADDRESS’;
    return $site_admin_email;
}
add_filter( 'wp_travel_enquiries_admin_emails', 'prefix_wp_travel_enquiries_admin_emails' );

Filter: wp_travel_admin_enquery_email_tags #

Trip enquiry admin enquiry email tags.

Source

File: /inc/trip-enquiries.php
Used by: /inc/trip-enquiries.php

Parameters
$emai_tags

Example:

function prefix_wp_travel_admin_enquery_email_tags( $email_tags ) {
    $email_tags[‘{CUSTOM KEY}’] = ‘VALUE’;
    return $email_tags;
}
add_filter( 'wp_travel_admin_enquery_email_tags', 'prefix_wp_travel_admin_enquery_email_tags' );

Filter: wp_travel_registration_error_email_exists #

Email already exists while registration error message.

Source

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

Parameters
Default is ‘__( ‘An account is already registered with your email address. Please log in.’,
‘wp-travel’ )’, $email

Example:

function prefix_wp_travel_registration_error_email_exists() {
    return ‘__( ‘This email has been already registered. Please
    use another one.’, ‘wp-travel’ )’;
}
add_filter( 'wp_travel_registration_error_email_exists', 'prefix_wp_travel_registration_error_email_exists' );

Filter: wp_travel_payments_admin_emails #

WP Travel payments admin email.

Source

File: /inc/payments/wp-travel-payments.php
Used by: /inc/payments/wp-travel-payments.php

Parameters
$site_admin_email

Example:

function prefix_wp_travel_payments_admin_emails( $site_admin_email ) {
    $site_admin_email = ‘test@test.com’;
    return $site_admin_email;
}
add_filter( 'wp_travel_payments_admin_emails', 'prefix_wp_travel_payments_admin_emails' );

Filter: wp_travel_payment_email_tags #

WP Travel payments email tags.

Source

File: /inc/payments/wp-travel-payments.php
Used by: /inc/payments/wp-travel-payments.php

Parameters
$email_tags

Example:

function prefix_wp_travel_payment_email_tags( $email_tags ) {
    $email_tags[‘{custom_key}’] = ‘VALUE’;
    return $email_tags;
}
add_filter( 'wp_travel_payment_email_tags', 'prefix_wp_travel_payment_email_tags' );

Filter: wp_travel_admin_payment_email #

WP Travel admin payment email content.

Source

File: /inc/payments/wp-travel-payments.php
Used by: /inc/payments/wp-travel-payments.php

Parameters
$admin_message_data, $booking_id

Example:

function prefix_wp_travel_admin_payment_email( $admin_message_data, $booking_id ) {
    $admin_message_data = ‘CONTENT HERE’;
    return $admin_message_data;
}
add_filter( 'wp_travel_admin_payment_email', 'prefix_wp_travel_admin_payment_email', 12, 2 );

Filter: wp_travel_client_payment_email #

WP Travel client payment email content.

Source

File: /inc/payments/wp-travel-payments.php
Used by: /inc/payments/wp-travel-payments.php

Parameters
$client_message_data, $booking_id

Example:

function prefix_wp_travel_client_payment_email( $client_message_data, $booking_id ) {
$client_message_data = ‘CONTENT HERE’;
return $admin_message_data;
}
add_filter( 'wp_travel_client_payment_email', 'prefix_wp_travel_client_payment_email', 12, 2 );

Filter:wptravel_traveller_salutation #

From WP Travel v7.3 salutation has been added by default. So, if you are willing to remove the salutation in front of the name of the booking email then below code can be used.

function example_callback( ) {
	    //Maybe modify $example in some way.
		return false;
	}
add_filter( 'wptravel_traveller_salutation', 'example_callback' );

Filter:wp_travel_enable_traveller_dob_booking_email #

Traveller Date of Birth

Active Since v7.8.0

Remove Date of Birth from the email

 add_filter( 'wp_travel_enable_traveller_dob_booking_email', function(){
	return false;
} );

Filter:wp_travel_enable_traveller_gender_booking_email #

Traveller Gender

Active Since v7.8.0

Remove Gender from the email

 add_filter( 'wp_travel_enable_traveller_gender_booking_email', function(){
	return false;
} );

Filter:wp_travel_enable_traveller_country_booking_email #

Traveller Country

Active Since v7.8.0

Remove Country from the email

add_filter( 'wp_travel_enable_traveller_country_booking_email', function(){
	return false;
} );

Filter:wp_travel_change_booking_status_mail_sending #

Disable email when booking status is changed

add_filter( 'wp_travel_change_booking_status_mail_sending', function(){
    return false;
} );

Filter:wp_travel_change_payment_status_mail_sending #

Disable email when payment status is changed

add_filter( 'wp_travel_change_booking_status_mail_sending', function(){
    return false;
} );