Please see:
By IP address: https://pastebin.com/GEkhpuji
By email: https://pastebin.com/1YUJbBWa
The code in the links above assume that you are assigning reviews. If you are not, remove the following parts of the code:
|| empty( $request['assign_to'] )
['key' => 'assigned_to', 'value' => $request['assign_to']],
Can I also limit users to have one review for each page/companies, by ip adress. So that they can review different companies, but only one review for one company
Please see the link in the reply above yours again. That’s exactly what it does, as long as you are assigning reviews to each company page correctly.
I did paste the whole code in my functions php but it doesn’t work.
I can review multiple times with my Ipadress. Can u help me?
@leyla1987 please make sure that you are using the assign_to option in the submission form shortcode. For example:
[site_reviews_form assign_to=post_id]
Also, this will only check for existing reviews that have been approved. If you have enabled the “Require Approval” setting, then new reviews are unapproved by default so this code will not work for that.
If you need to check for both approved and unapproved reviews, please see the updated code snippet: https://pastebin.com/GEkhpuji
-
This reply was modified 6 years, 10 months ago by
Gemini Labs.
-
This reply was modified 6 years, 10 months ago by
Gemini Labs.