Change price units from Per day to "/Min"

Hello,

Right now I have it showing per day, but i want it to show per minute. I read somewhere that i should add this code below, but it doesnt say WHERE to add the code to fix this problem.

Can someone please tell me how to insert this code and where on the wordpress dashboard to put it?

Thanks

Here is the code

add_filter(
	'hivepress/v1/models/listing/fields',
	function( $fields, $listing ) {
		if (hivepress()->get_version( 'bookings' ) && hivepress()->booking->is_time_enabled( $listing->get_id()) && isset( $fields['price'] ) ) {
			$fields['price']['display_template'] = '%value% / min';
		}
		return $fields;
	},
	1000,
	2
);

If you use Bookings then yes, you can add this code snippet to change the price format but please note that the date picker will still allow selecting the date range, and the price will be multiplied by the number of days. This may work ok if you use time slots instead of day-based bookings.

Please try following these instructions to add the code snippet (via the Code Snippets plugin) How to add custom code snippets - HivePress Help Center

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.