Support » Plugin: WP Customer Reviews » Feature request: more info in e-mail

  • rea5245


    I would like to see more info in the e-mail that the plug-in sends to notify me that a new review has been posted.

    Every time I upgrade WP Customer Reviews, I modify the code so that the e-mail includes the reviewer’s IP address and a link to to look up info about his server (to help me check whether the review looks “real”). I also add a link to my site’s Reviews page (to make it easy for me to read and approve the review).

    First, I add this helper function to get the reviewer’s IP address:

    function func_get_ip()
        $ip = ( isset( $_SERVER['REMOTE_ADDR'] ) ) ? $_SERVER['REMOTE_ADDR'] : '';
        return $ip;

    Then, I edit wp-customer-reviews-3.php, at the @wp_mail line and change it to:

    @wp_mail(get_bloginfo(‘admin_email’), “WP Customer Reviews: New Review Posted on {$datetime}”, “A new review has been posted on ” . get_bloginfo(‘name’) . ” from ” . func_get_ip() . ” (” . func_get_ip() . “) via WP Customer Reviews. \n\nYou will need to approve this review (” . home_url(“wp-admin/edit.php?post_type=wpcr3_review”) . “) before it will appear on your site.”);

  • You must be logged in to reply to this topic.