Skip to content

Instantly share code, notes, and snippets.

@WillBrubaker
Created June 16, 2015 23:19
Show Gist options
  • Save WillBrubaker/16aed85339534dc98bad to your computer and use it in GitHub Desktop.
Save WillBrubaker/16aed85339534dc98bad to your computer and use it in GitHub Desktop.
Force Resource Selection for WooCommerce Bookings Resources
add_filter( 'booking_form_fields', 'handsomebeardedguy_booking_form_fields' );
function handsomebeardedguy_booking_form_fields( $fields ) {
if ( isset( $fields['wc_bookings_field_resource'] ) ) {
$fields['wc_bookings_field_resource']['options'][0] = 'Make a selection...';
ksort( $fields['wc_bookings_field_resource']['options'] );
}
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment