View Categories

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'; 
} );

Filter: wptravel_pay_with_stripe_btn_text #

From v11.0.0

Use this hook to rename the Pay with Stripe button text.

add_filter('wptravel_pay_with_stripe_btn_text', function() {
     return 'Your text here';
});

Filter: wptravel_pay_with_stripe_btn_text #

From v11.0.0

Use this hook to change theย Proceed Paymentย button label

add_filter('wptravel_pay_with_stripe_btn_text', function() {
     return 'Your text here';
});

Filter: wp_travel_checkout_fields #

To display only Partial Payment option in the payment mode section on the checkout page,

function wptravel_customize_booking_option( $fields ) { 
  $fields['payment_fields']['payment_mode']['default'] = 'partial'; 
  $fields['payment_fields']['payment_mode']['options'] = array( 'partial' => 'Partial Payment' );  
  return $fields; 
} 
add_filter( 'wp_travel_checkout_fields', 'wptravel_customize_booking_option' );