Skip to content

Instantly share code, notes, and snippets.

@woogist
Created May 7, 2015 14:33
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 woogist/57d3e2108fac6781c13e to your computer and use it in GitHub Desktop.
Save woogist/57d3e2108fac6781c13e to your computer and use it in GitHub Desktop.
function wc_edit_bookings_form_fields_order( $fields ) {
$duration = $fields['wc_bookings_field_duration'];
$persons = $fields['wc_bookings_field_persons'];
$resource = $fields['wc_bookings_field_resource'];
$date = $fields['wc_bookings_field_start_date'];
$new_fields = array(
'wc_bookings_field_start_date' => $date,
'wc_bookings_field_resource' => $resource,
'wc_bookings_field_duration' => $duration,
'wc_bookings_field_persons' => $persons
);
return $new_fields;
}
add_filter( 'booking_form_fields', 'wc_edit_bookings_form_fields_order' );
@TomasHurtz
Copy link

What about person types? they have variation ID at the end - but no longer showing when using this code.

https://gist.github.com/MindyPostoff/c70dc98a099a9bf1c2f0#gistcomment-1406818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment