Last active
August 2, 2016 02:56
-
-
Save WillBrubaker/21a245e0e0ee7e006202 to your computer and use it in GitHub Desktop.
Change WooCommerce Booking Duration Label
This file contains hidden or 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
add_filter( 'booking_form_fields', 'wooninja_booking_form_fields' ); | |
function wooninja_booking_form_fields( $fields ) { | |
//Changes the text 'Day(s)' to 'Night(s)' | |
$fields['wc_bookings_field_duration']['after'] = str_replace( 'Day(s)', 'Night(s)', $fields['wc_bookings_field_duration']['after'] ); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sir, i need help please.
Do you know how can i force and replace the Duration input to a select field that only accept 1,4,8 (days).
In the configuration i have 1 day min, 8 days max, but i want customers be forced to choose only between 1,4,8 . I need really to hardcode this. I find this the best way to do it.
Thanks!