• Hi,

    When I am adding review there is no success message is displaying just page is loading. So i wanted to show the success message. Also i am approving reviews from Review tabs as suggested in support forums but not working.

    Help will be appreciated.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    hope you are doing well! ??

    Please, add this custom code in the functions.php of your active theme:

    add_action('init','yith_show_notice_for_submitted_review');
    
    function yith_show_notice_for_submitted_review(){
        if( isset($_POST['comment_post_ID']) ){
            wc_add_notice('Your review has submitted correctly');
        }
    }

    Let us know.

    Have a great day!

    Thread Starter pallavibramhe2806

    (@pallavibramhe2806)

    No, it is not working. can I convert it into ajax code instead of page load? and why am I not able to approve any review. Am I missing something?

    Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    Thanks for contacting us and I hope you’re doing well:)

    I did a test on my local installation with the code provided and the message is showed in the right way.

    See the following link

    The code I used is the following:

    if( !function_exists('yith_show_notice_for_submitted_review') ) {
        add_action('init', 'yith_show_notice_for_submitted_review');
    
        function yith_show_notice_for_submitted_review()
        {
            if (isset($_POST['comment_post_ID'])) {
                wc_add_notice('Your review has been submitted correctly');
            }
        }
    }

    About your question:

    can I convert it into ajax code instead of page load?

    It’s necessary to execute a page load in order to show the wc_add_notice and also add the reviews on reviews tab, for this reason a page load is executed.

    Maybe another plugin or your theme is not showed the notification. I tried it using only TwentySixteen, WooCommerce and our plugin.

    Please check it and let me know.

    Have a good day.

    Hi @yithemes

    I faced with the same issue and your code doesn’t work for me either.
    I’ve tested it on multiple themes, with and without other plugins enabled.

    What is more, I found that activating your plugin also breaks default blog comments. They also stop displaying comments on moderation.

    I wonder if you plan to fix this in future updates?
    Letting users know that their comment or review was submitted is crucially important. Especially, that it’s working fine in default wordpress comments.

    Regards,
    Kon

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need to show success message and currently approved reviews are not displaying’ is closed to new replies.