# How to manually approve bookings

**URL:** <https://community.hivepress.io/t/how-to-manually-approve-bookings/6800>\
**Category:** Bookings\
**Tags:** bookings\
**Created:** [July 29, 2023, 11:15am UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800 "2023-07-29T11:15:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonavshalom](https://community.hivepress.io/user_avatar/community.hivepress.io/simonavshalom/32/859_2.png) [@simonavshalom](https://community.hivepress.io/u/simonavshalom)\
**Post date:** [July 29, 2023, 11:15am UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/1 "2023-07-29T11:15:15Z")

</div>

Hi, I need some snippets that will enable manual approval for all listings on the website. There should be any listing that user can process the payment until vendor accept this booking.  
I also need another one that will always enable manual approval there will not be an option to choose manual approval or not.

I know how to do it with custom field but since it’s not related to custom field I need your help.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [July 31, 2023, 7:35am UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/2 "2023-07-31T07:35:37Z")

</div>

Hi,

If you mean manually approve listings, you can enable Manually approve new listings in HivePress \> Settings \> Listings. But if you mean manually approve bookings, please check this topic [Manually accept new booking are checked by default and hidden - #3 by Givilo](https://community.hivepress.io/t/manually-accept-new-booking-are-checked-by-default-and-hidden/6184/3)

​I hope this is helpful to you.

---

<div class="post-metadata">

**Author:** ![simonavshalom](https://community.hivepress.io/user_avatar/community.hivepress.io/simonavshalom/32/859_2.png) [@simonavshalom](https://community.hivepress.io/u/simonavshalom)\
**Post date:** [July 31, 2023, 7:59am UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/3 "2023-07-31T07:59:08Z")

</div>

Thank you.

```auto
add_action('hivepress/v1/models/listing/create', function($listing_id) {
	if(hivepress()->get_version( 'bookings' )){
		update_post_meta($listing_id, 'hp_booking_moderated', true);	
	}

},
1000
);

```

when using this one it’s not checked the box. even when I update the post. the checkbox of manual approval is unchecked.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [August 1, 2023, 6:48am UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/4 "2023-08-01T06:48:53Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![simonavshalom](https://community.hivepress.io/user_avatar/community.hivepress.io/simonavshalom/32/859_2.png) [@simonavshalom](https://community.hivepress.io/u/simonavshalom)\
**Post date:** [August 1, 2023, 7:21am UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/5 "2023-08-01T07:21:11Z")

</div>

I add a new listing but the checkbox of manual approval is not checked on the backend. I also need a solution to set manual approval of all the existing listings on the website.

---

<div class="post-metadata">

**Author:** ![yevhen](https://community.hivepress.io/user_avatar/community.hivepress.io/yevhen/32/23_2.png) [@yevhen](https://community.hivepress.io/u/yevhen)\
**Post date:** [August 3, 2023, 8:57pm UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/9 "2023-08-03T20:57:38Z")

</div>

Please enable the `Manually approve new listings` setting in `HivePress/Settings/Listings` to manually approve new listings.

Please try this PHP code snippet for the Booking Requests attribute instead of the previous one.

```auto
add_action(
	'hivepress/v1/models/listing/create', 
	function($listing_id, $listing) {
		if(hivepress()->get_version( 'bookings' )){
			$listing->set_booking_moderated(true)->save_booking_moderated();	
		}
	},
	1000,
	2
);

```

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [September 2, 2023, 8:58pm UTC](https://community.hivepress.io/t/how-to-manually-approve-bookings/6800/10 "2023-09-02T20:58:09Z")

</div>

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