Skip to content

Instantly share code, notes, and snippets.

@Steeru
Created May 14, 2018 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Steeru/ca0938cc346604004a9badea10c94f9b to your computer and use it in GitHub Desktop.
Save Steeru/ca0938cc346604004a9badea10c94f9b to your computer and use it in GitHub Desktop.
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