Automatic redirection to review

Hi, guys. It would be helpful to. Automatically redirect to write a review for the completed service after the user confirms the completed transaction

Unfortunately, the rating system is not as vendor friendly, as the user is not automatically directed to a review after the service is rendered.

Thanks, we’ll consider adding this feature, also maybe a reminder email about the review after the order is completed (you can also add this to the Order Completed email as a temporary workaround).

1 Like

When I create a custom email for Order completed how can I insert a link in the message that will redirect the user to leave a review page for his order? %order_url% will do it?

If you mean review for the listing, which is in the order, then we can check the possibility of providing the code snippet if it is urgent for you. But we already work on this feature which will be in the future updates of the HivePress Review extension

Yes, please. I need the order completed email will contain a link that will transfer the user directly to leave reviews for his order/listing order. Because now it is very difficult to understand for user regular user how to leave a review for his order, so if the user will receive a link inside the order completed message that will transfer him directly to leave a review for his listing I will be great.

If you have any code snippet that can make this option happen this is great as a temporary workaround.

Please try this PHP snippet as a temporary solution. It adds token %listing_url% to Order Completed email template, which you can edit in HivePress/Emails

add_filter(
	'hivepress/v1/emails/order_complete',
	function( $args ) {
		if ( !isset( $args['tokens']['order_number'] ) ) {
			return $args;
		}
		
		$order_id = intval(ltrim($args['tokens']['order_number'], '#'));
			
		if(!$order_id){
			return $args;
		}
		
		$order = wc_get_order($order_id);
		
		if(!$order){
			return $args;
		}
		
		$item = hivepress()->helper->get_first_array_value( $order->get_items() );

		if ( ! $item || ! $item->get_product_id() ) {
			return;
		}
		
		$product = $item->get_product();
		
		if(!$product){
			return $args;
		}
		
		$listing = null;
		$listing_id = $product->get_parent_id();

		if ( $listing_id ) {
			$listing = \HivePress\Models\Listing::query()->get_by_id( $listing_id );
		}
		
		if(!$listing){
			return $args;
		}
		
		$listing_url = get_permalink( $listing->get_id() );
		
		if(!$listing_url){
			return $args;
		}

		$args['tokens']['listing_url'] = $listing_url;

		return $args;
	},
	1000
);

Thank you. but the order completed email template on hivepress is sending email to the vendor and not to the user. So it’s unuseful to send the vendor the order details to leave a review. the order url should be in the email that buyer receive.

Sorry for the confusion. Unfortunately, there is no simple solution to customize the WooCommerce email, which is sent to users when an order is completed. But we already work on adding HivePress email to request feedback when the order is completed. This feature will be in the future updates of the HivePress Review extension. If it is urgent for you and you are not familiar with the code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY