Allow hosts to accept or decline each booking

When I click on “List a property”, I need to choose wether I need to “Manually accept new bookings”. How do I remove this option? I would like each and every bookings to be required to be manually accepted by the vendor / host.

Please keep in mind that I have the following:

  • RentalHive
  • Hivepress Version 1.6.16
  • Hivepress Blocks Version 1.0.0
  • Hivepress Bookings Version 1.4.11
  • Hivepress Favourites Version 1.2.2
  • Hivepress Geolocation Version 1.3.7
  • Hivepress Marketplace Version 1.3.7
  • Hivepress Messages Version 1.3.0
  • Hivepress Reviews Version 1.3.0
  • Hivepress Social Login Version 1.0.1

Hi,
Please try this PHP snippet:

add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		if ( isset($attributes['booking_moderated']) ) {

			$attributes['booking_moderated']['editable'] = false;
		}
		
		return $attributes;
	},
	1000
);
add_action('hivepress/v1/models/listing/create', function($listing_id) {
	if(hivepress()->get_version( 'bookings' )){
		update_post_meta($listing_id, 'hp_booking_moderated', true);	
	}
});
1 Like

So I used this snippet and it worked but how do hosts / vendors actually accept or reject users? I can see that hosts / vendors can “complete transactions” but I don’t see where they can reject bookings or transactions.

Hi,

If the booking request is enabled for the listing, the vendor must set the booking status to accept or decline before payment. After these actions, payment should already be made.

Sorry I am a bit confused.

I used the PHP snippet above.

How do vendors set the booking status to accept or decline before the payment?

Currently, my hosts (sellers) are not able to accept or decline the booking requests. Currently, the guests (buyer) goes straight into paying for the listing before the hosts are able to accept or decline the booking request.

How do I make it so that the guests have to make a booking requests → hosts accept or decline the booking request → guests make the payment or the payment goes through

How do I get guests to make a booking request before having the booking confirmed? Bookings are confirmed automatically right now for no reason

Hi,

If you want to allow vendors to set the booking status to accept or decline before the payment, please delete the code snippet that we sent to you before.

You can select Manually accept new bookings in the listing form, then each booking will require a confirmation from the host.

Ok I will delete the previous snippet. Can you create a new snippet that forces every new vendor to manually accept new bookings?

Right now, vendors have the option to either manually accept new bookings or not manually accept new bookings. But I want every vendor to be required to manually accept new bookings.

Since I want every vendor to manually accept new bookings, can you remove the tick box in the page for “list a property”?

Hi,

The code snippet that we sent you earlier for such actions and created, please try to test this code snippet, for example, by creating a new listing.

I have tried it and hosts are still not able to manually accept or reject bookings. The bookings automatically get confirmed without the hosts being able to choose to accept or reject it.

Can you send me a code snippet that works?

Please try removing the suggested snippet, and let me know if the Booking Requests checkbox appears in the listing form. If you check it and save changes, the listing page should show the Request to Book button instead of Book Now - let me know if it works this way when you test it.