Action Hooks Associated With Payment

Action: wp_travel_after_payment_detail #

Fire after admin payment detail.

Source

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

Parameter
$booking_id, $payment_args

Example:

function prefix_wp_travel_after_payment_detail( $booking_id, $payment_args ) {
    esc_html_e( ‘This is content added using this hook’, ‘text-domain’ );
}
add_action( 'wp_travel_after_payment_detail', 'prefix_wp_travel_after_payment_detail'  );

Action: wp_travel_action_before_payment_info_field #

Fire in the WP Travel checkout before payment fields.

Source

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

Example:

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

Action: wp_travel_action_after_payment_info_field #

Fire in the WP Travel checkout after payment fields.

Source

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

Example:

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

Action: wt_before_payment_process #

Fire before WP Travel payment processing.

Source

File: /inc/gateways/bank-deposit/bank-deposit.php
Used by: /inc/gateways/bank-deposit/bank-deposit.php, /inc/gateways/standard-paypal/class-wp-travel-gateway-paypal-request.php

Parameters
$booking_id

Example:

function prefix_wt_before_payment_process( $booking_id ) {
    // Code here.
}
add_action( ‘wt_before_payment_process', 'prefix_wt_before_payment_process’ );

Action: wp_travel_after_successful_payment #

Fire after WP Travel payment status update.

Source

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

Parameters
$booking_id

Example:

function prefix_wp_travel_after_successful_payment( $booking_id ) {
    // Code here.
}
add_action( ‘wp_travel_after_successful_payment', 'prefix_wp_travel_after_successful_payment’ );

Action: wp_travel_before_payment_email_send #

Fire before WP Travel payment email sent to admin & customer.

Source

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

Parameters
$booking_id

Example:

function prefix_wp_travel_before_payment_email_send() {
    // Code here.
}
add_action( ‘wp_travel_before_payment_email_send', 'prefix_wp_travel_before_payment_email_send’ );

Action: wp_travel_multiple_payment_emails #

Hook to handle multiple payment emails.

Source

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

Parameters
$booking_id

Example

function prefix_wp_travel_multiple_payment_emails() {
     // Code here.
}
add_action( ‘wp_travel_multiple_payment_emails', 'prefix_wp_travel_multiple_payment_emails’ );

Action: wp_travel_after_payment_email_sent #

Fire after payment email sent. Hook to handle invoice.

Active Since v3.0.6

Source

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

Parameters
$booking_id, $email_data, $email_tags

Example:

function prefix_wp_travel_after_payment_email_sent( $booking_id, $email_data, $email_tags ) {
    // Code here.
}
add_action( ‘wp_travel_after_payment_email_sent', 'prefix_wp_travel_after_payment_email_sent’ );