Skip to content

Instantly share code, notes, and snippets.

@lmartins
Forked from MindyPostoff/gist:c70dc98a099a9bf1c2f0
Last active August 29, 2015 14:13
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 lmartins/9665ca5a0c5fdab9fade to your computer and use it in GitHub Desktop.
Save lmartins/9665ca5a0c5fdab9fade to your computer and use it in GitHub Desktop.
/**
* A function to reorder the default display of fields on the WooCommerce Bookings form
* Put this function in your theme's functions.php file
*/
function custom_order_booking_fields ( $fields ) {
$reorder = array();
$reorder[] = $fields['wc_bookings_field_duration'];
$reorder[] = $fields['wc_bookings_field_resource'];
$reorder[] = $fields['wc_bookings_field_persons'];
$reorder[] = $fields['wc_bookings_field_start_date'];
return $reorder;
}
add_filter( 'booking_form_fields', 'custom_order_booking_fields');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment