# Snippet required for reviews with booking completed (no payment performed)

**URL:** <https://community.hivepress.io/t/snippet-required-for-reviews-with-booking-completed-no-payment-performed/17808>\
**Category:** Bookings\
**Tags:** code\
**Created:** [July 2, 2026, 6:39pm UTC](https://community.hivepress.io/t/snippet-required-for-reviews-with-booking-completed-no-payment-performed/17808 "2026-07-02T18:39:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![giuliana](https://community.hivepress.io/letter_avatar_proxy/v4/letter/g/6f9a4e/32.png) [@giuliana](https://community.hivepress.io/u/giuliana)\
**Post date:** [July 2, 2026, 6:39pm UTC](https://community.hivepress.io/t/snippet-required-for-reviews-with-booking-completed-no-payment-performed/17808/1 "2026-07-02T18:39:33Z")

</div>

I would to like to enable reviews for users who have a confirmed booking request (without online payments), how to do this?

Is it possible to allow to leave a review after the booking has been completed (without payment)? Is it possible to generate any email reminder to the customer to submit a review?

Thank you in advance for any support.

---

<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:** [July 2, 2026, 6:39pm UTC](https://community.hivepress.io/t/snippet-required-for-reviews-with-booking-completed-no-payment-performed/17808/2 "2026-07-02T18:39:33Z")

</div>

Thanks for your message — our team will reply shortly.

In the meantime, you can also get instant help from our [AI Assistant](https://www.chatbase.co/PdfFucPZ0vUmh3dfM-oe1/help), familiar with all the docs and solutions we’ve shared over the years.

---

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [July 4, 2026, 7:08pm UTC](https://community.hivepress.io/t/snippet-required-for-reviews-with-booking-completed-no-payment-performed/17808/4 "2026-07-04T19:08:46Z")

</div>

Hi,

Please try this code snippet:

```auto
add_filter(
	'hivepress/v1/models/review/errors',
	function( $errors, $review ) {
		if ( $errors ) {
			return $errors;
		}

		$booking = \HivePress\Models\Booking::query()->filter(
			[
				'user' => $review->get_author__id(),
				'listing' => $review->get_listing__id(),
				'status' => 'publish',
				'end_time__lt' => time(),
			]
		)->get_first();

		if ( ! $booking ) {
			$errors[] = 'custom error message';
		}

		return $errors;
	},
	1000,
	2
);

```

You can add it via the Code Snippets plugin. It allows adding a review only if the current user has at least 1 confirmed booking with the past end date, for the current listing. You can also customize the error message in the code snippet.

Unfortunately there’s no review reminder email in the current version, but we plan to add it with the upcoming extension updates.

Hope this helps

---

<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:** [August 3, 2026, 7:08pm UTC](https://community.hivepress.io/t/snippet-required-for-reviews-with-booking-completed-no-payment-performed/17808/5 "2026-08-03T19:08:52Z")

</div>

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