Maximum duration of the reservation (days)

Hi, I need the MAXIMUM RESERVATION DURATION ( DAYS ) field to be set to 90 days by default. Currently the field is empty when someone posts an ad.
Thank you very much.

Please, try this PHP snippet:

add_action('hivepress/v1/models/listing/create', function($listing_id) {
	update_post_meta($listing_id, 'hp_booking_max_length', 90);

Hello ; thank you very much for the answer but it doesn’t work for me. It is still empty.
I need this field to be filled by default with the value of days “90” when publishing an advert.

Hola ; muchas gracias por la respuesta pero no me funciona. Me sigue apareciendo vacío.
Necesito que al publicar un anuncio ese campo salga por defecto relleno con el valor de dias “90”


Please try adding a few new listings. There may be a listing auto-draft and the “90 days limitation” will start working after adding several listings.

I tested it locally and everything seems working.

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