• Resolved gerald@WPcustoms

    (@geeman12030)


    Hi,
    comment rating is enabled with 90% influence.
    If a visitor leaves a comment without setting the rating slider the cwp_add_comment_meta_values action saves all meta_options as 0 thus having a negative impact on the overall score.

    I went through the function cwp_add_comment_meta_values() in cwp_comments.php trying to add another check if the value is ‘0’ then skip but that also doesn`t fix the issue.

    Can you please help me out on this one?
    Everything else is working great and you really did a good job on the plugin.
    Thanks
    Gerald

    https://wordpress.org/plugins/wp-product-review/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter gerald@WPcustoms

    (@geeman12030)

    I modified the function so it does not save the comment meta_option if it`s 0.
    (just for testing purpose :))

    Though this still does not make sense because you are doing a check in wp-product-review.php line #68 if I got this right:
    if(!empty(${'option'.$i.'_grade'})|| ${'option'.$i.'_grade'} === '0'){ ...

    So if the 0 value is NOT saved to the post`s comment meta it still gets counted towards the $overall_score

    Plugin Author Codeinwp

    (@codeinwp)

    Hey Gerald,

    I will look into it next week.

    Thanks!

    Thread Starter gerald@WPcustoms

    (@geeman12030)

    Hi,
    any news on this? 🙂

    Plugin Author Codeinwp

    (@codeinwp)

    just fixed it in the latest update. Now the default comment rating is ”, if a user want to make it 0, only then will be taken into consideration.

    I am afraid that this will only work for new comments.

    Thread Starter gerald@WPcustoms

    (@geeman12030)

    great job!
    that works perfectly now.

    Thanks a lot for the update.
    Keep up the good work.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘comment rating influence if meta_option is not set (0)’ is closed to new replies.