Handling Failed and Success Messages with glsr_create_review Function
-
Hello,
I’m using the apply_filters(‘glsr_create_review’, false, []); function in PHP to create reviews. I need to implement checks for duplicates and limit the number of reviews to one per person, just like the standard review form displayed via shortcodes.
Additionally, I want to display messages similar to the standard form, such as:
<div class="glsr-form-message glsr-form-failed">Duplicate review detected. It looks like you already said that!</div>
<div class="glsr-form-message glsr-form-success">Your review has been submitted!</div>Is there a way to get the result or error from the function so I can handle these messages accordingly? Or do I need to implement custom logic for this?
Thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.