I used the below snippet to add the words “per 30 minutes” after the price attribute on my Listings. This works great on the Listing blocks. However, when I click through to the Listing page and add timeslots to be purchased, it multiplies the price by the number of timeslots I selected. For example: If a Listing costs $50 per 30 minutes, and I choose 2 timeslots, the price on the Listing page will visually update to show “$100 per 30 minutes,”
So it it possible to only have that wording show on the Listing block? And then on the Listing page I can have different wording showing like “Total Price”?
> add_filter(
> 'hivepress/v1/models/listing/fields',
> function( $fields, $model ) {
> if ( isset( $fields['price'] ) ) {
> $fields['price']['display_template'] = '%value% per 30 minutes';
> }
>
> return $fields;
> },
> 1000,
> 2
> );