Manualy accept new bookings

Hello,

How can i make the “manually accept new booking” checkbox to be checked by default?

Thanks!

Please try this PHP snippet. This option will be checked by default for new listings

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

solved , thank you yevhen :slight_smile:

Hi yevhen, I need to manually accept bookings as well but I put the following code that you explain in code snipets and it doesn’t work. I still see the box unchecked in the sellers tab when I register the user as a seller.

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

Please try to add a new listing. This code snippet works only for new listings

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