Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to auto approve star only reviews #82

Conversation

KaemonIsland
Copy link

@KaemonIsland KaemonIsland commented Mar 30, 2020

This PR adds two new config options.

approve_star_only

When set to true all created/updated reviews with just a star rating, no title/review, will be automatically approved.

approve_star_only_for_verified_purchaser

Similar to approve_star_only. When this option is set to true will auto-approve star only reviews only if the review user is a verified purchaser.

Kaemon Lovendahl added 2 commits March 27, 2020 15:53
Verified_purchaser being called on before_create would only
set the verfied_purchaser when a user creates a revew, obviously.

Recent updates have allowed users to update reviews, and it is possible
to create a review before purchasing the product, then come back
later after purchasing to update their review. Because of this
the before_create callback has been changed to before_save.
This way we can check if the user is a verified purchaser
before creating/updating a revew.
@ericsaupe ericsaupe merged commit 3b8fd24 into solidusio-contrib:master Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants