Filters Associated With Payment

Filter: wp_travel_payment_status_list #

WP Travel all payment status list.

Source

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

Parameters
$status

Example:

function prefix_wp_travel_payment_status_list( $status ) {
    $status[‘custom status’] = array(
    ‘color’ => ‘#FFFFFF’,
    ‘text’ => __( ‘Custom Status’, ‘wp-travel’),
    );
    return $status;
}
add_filter( 'wp_travel_payment_status_list', 'prefix_wp_travel_payment_status_list' );

Filter: wp_travel_payment_mode_list #

WP Travel all payment mode list.

Active Since v1.0.5

Source

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

Parameters
$mode

Example:

function prefix_wp_travel_payment_mode_list( $mode ) {
    $mode[‘custom status’] = array(
    ‘color’ => ‘#FFFFFF’,
    ‘text’ => __( ‘Custom Status’, ‘wp-travel’),
    );
    return $mode;
}
add_filter( 'wp_travel_payment_mode_list', 'prefix_wp_travel_payment_mode_list' );

Filter: wp_travel_custom_partial_payment_string #

WP Travel custom partial payment label.

Active Since v3.0.7

Source

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

Parameters
$custom_partial_payout_string

Example:

function prefix_wp_travel_custom_partial_payment_string(
    $custom_partial_payout_string ) {
    $custom_partial_payout_string = ‘__( 'Partial Payout (MIN)(%)', 'wp-travel' )’;
    return $custom_partial_payout_string;
}
add_filter( 'wp_travel_custom_partial_payment_string', 'prefix_wp_travel_custom_partial_payment_string' );

Filter :wp_travel_partial_payment_string #

WP Travel custom partial payment label.

Source

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

Parameters
$partial_payment_string, $settings

Example:

function prefix_wp_travel_partial_payment_string( $partial_payment_string, $settings ) {
    $partial_payment_string = ‘__( ‘Payout (MIN)(%)', 'wp-travel' )’;
    return $partial_payment_string;
}
add_filter( 'wp_travel_partial_payment_string', 'prefix_wp_travel_partial_payment_string', 12, 2 );

Filter: wp_travel_payment_modes #

Filter for WP Travel payment modes.

Source

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

Parameters
$modes

Example:

function prefix_wp_travel_payment_modes( $modes ) {
    $mode[‘custom_mode’] = esc_html__( ‘Custom Payment’, ‘wp-travel’ );
    return $mode;
}
add_filter( 'wp_travel_payment_modes', 'prefix_wp_travel_payment_modes' );

Filter: wp_travel_payment_gateway_lists #

WP Travel payment gateway list.

Active Since v1.1.0

Source

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

Parameters
$gateway

Example:

function prefix_wp_travel_payment_gateway_lists( $gateway ) {
    $gateway[‘payfast’] = __( ‘PayFast Checkout’, ‘wp-travel’ );
    return $gateway;
}
add_filter( 'wp_travel_payment_gateway_lists', 'prefix_wp_travel_payment_gateway_lists' );

Filter: wp_travel_payout_percent #

WP Travel minimum payout percent.

Source

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

Parameters
$payout_percent, $post_id

Example:

function prefix_wp_travel_payout_percent( $payout_percent, $post_id ) {
    $payout_percent = array( 15 );
    return $payout_percent;
}
add_filter( 'wp_travel_payout_percent', 'prefix_wp_travel_payout_percent', 12, 2 );

Filter: wp_travel_selected_payment_gateway #

WP Travel currently selected payment gateway.

Source

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

Parameters
$selected_payment

Example:

function prefix_wp_travel_selected_payment_gateway( $selected_payment ) {
    $selected_payment = ‘Manage Payment’;
    return $selected_payment;
}
add_filter( 'wp_travel_selected_payment_gateway', 'prefix_wp_travel_selected_payment_gateway' );

Filter: wptravel_default_payment #

With the release of WP Travel v8.8.0 unique feature that enables you to specify a default payment method for bookings and other services.

add_filter( 'wptravel_default_payment', function(){ 
return 'PayPal'; 
} );

Filter: wptravel_hide_zip_stripe_card #

With the release of WP Travel v8.5.0 the hook has been implemented to exclude the zip code field from the Stripe card payment process.

This customization aims to enhance the user experience for customers in the UAE when making payments via Stripe on the platform.

add_filter( 'wptravel_hide_zip_stripe_card', function(){
 return 'yes'; 
} );