How can you allow only persons who have booked or bought a product to add a review?

Note: You need to have the WP Job Manager - Reviews Plugin to restrict reviews

You can restrict reviews to only allow those users who have booked or bought a product by going to Listings ▸ Settings ▸ Reviews and check the option "Restrict Reviews"


Further Reading: