Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.