Manually accept new booking by default

I read the previous topics but in my case the Manually accept new bookings option is in the vendor setting page and not in the listing page. Yet, I would like to have this always selected and remove from the from. Is this possible?

Hi,
Please try this PHP snippet:

add_action('hivepress/v1/models/vendor/create', function($vendor_id) {
 update_post_meta($vendor_id, 'hp_booking_moderated', '1');
});

Also, enable, please Manage availability per vendor in HivePress > Settings > Bookings > Availability.

Thanks, it works.

Is it now possible to filter that field from the form so that the vendor cannot change it anymore?
Emanuele

Hi,
If I understand you correctly, please try this PHP snippet:

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		unset( $form['fields']['booking_moderated'] );

		return $form;
	},
	1000
);
1 Like

I meant when calendar is per vendor and the field is on the vendor setting form. I replaced listing_update with vendor_update in the code and it worked. Thanks

1 Like

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