Created
May 14, 2018 08:52
-
-
Save Steeru/ca0938cc346604004a9badea10c94f9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wp_travel_customize_text_booking_form_field( $fields ) { | |
if ( is_array( $fields ) ) { | |
$new_fields = array(); | |
foreach( $fields as $f_k => $f_v ) { | |
if ( 'booking_option' === $f_k ) { | |
$f_v['options'] = array( 'booking_with_payment' => esc_html__( 'Booking with payment', 'wp-travel' ), 'booking_only' => esc_html__( 'Your text', 'wp-travel' ) ); | |
} | |
$new_fields[$f_k] = $f_v; | |
} | |
return $new_fields; | |
} | |
} | |
add_filter( 'wp_travel_booking_form_fields', 'wp_travel_customize_text_booking_form_field', 999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment