Hide “Cancel Booking” after booking is completed only users

We want to hide the cancel reservation button only for users or buyers.

We want only the vendor to be able to cancel the reservation from the reservation details page.

Is there a PHP Snippet that can be provided to easily do this?



Please check the solution in this topic Hide Cancel Booking Button on Booking Details Page when Status of Order is Processing - #3 by ihor

P.S. If you purchased a theme or extension, please enter the license key in the forum profile settings, this will enable the Premium Support badge and ensure a 24-hour turnaround time.


I am currently using this code on my site but I would like it to only be hidden from the user or buyer

We would like the host to have the option to cancel reservations.

Can you help me with a PHP Snippet, please?


Thank you for waiting. Please try this PHP code snippet but please note that it can require further customization.

	function ($blocks, $template){
			return $blocks;
		$order = $template->get_context('order');
			return $blocks;
		$order_status = $order->get_status();
		if(!$order_status || 'processing' !== $order_status){
			return $blocks;
		return hivepress()->helper->merge_trees(
					[ 'blocks' => $blocks ],
						'blocks' => [
							'booking_cancel_link' => [
								'type' => 'content',

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