Last active
July 26, 2023 17:21
-
-
Save hivepress/da2e25219ed47ede2a92f1090303c44d to your computer and use it in GitHub Desktop.
Change the price display format for bookable listings #hivepress #listings #bookings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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