Skip to content

Instantly share code, notes, and snippets.

@hivepress
Last active July 26, 2023 17:21
Show Gist options
  • Save hivepress/da2e25219ed47ede2a92f1090303c44d to your computer and use it in GitHub Desktop.
Save hivepress/da2e25219ed47ede2a92f1090303c44d to your computer and use it in GitHub Desktop.
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