add_filter(
'hivepress/v1/models/listing/attributes',
function( $attributes ) {
if ( isset( $attributes['booking_slot_duration'] ) ) {
$attributes['booking_slot_duration']['display_areas'] = [ 'view_page_primary', 'view_block_secondary' ];
}
return $attributes;
},
1000
);
add_filter(
'hivepress/v1/fields/number/display_value',
function( $value, $field ) {
if ( $field->get_name() === 'booking_slot_duration' ) {
$value = '<i class="hp-icon fas fa-fw fa-clock"></i> Duration: ' . intdiv( $value, 60 ) . ':' . ( $value % 60 );
}
return $value;
},
1000,
2
);
Hi, use this code instead. It will work with clock and say duration and with this format 1:00