Skip to content

Instantly share code, notes, and snippets.

@hivepress
Last active July 28, 2022 10:06
Embed
What would you like to do?
Change the price display format for bookable listings #hivepress #listings #bookings
<?php
add_filter(
'hivepress/v1/models/listing/fields',
function( $fields, $model ) {
if ( isset( $fields['price'] ) ) {
$fields['price']['display_template'] = '%value% / day';
}
return $fields;
},
1000,
2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment