Viewing 1 replies (of 1 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    It looks like you are using an ancient version of PHP which doesn’t support closures. Kindly edit includes/functions.php and replace

    
    add_action( 'comment_duplicate_trigger', function ( $commentdata ) {
    	$post_reviews = mts_get_post_reviews( $commentdata['comment_post_ID'] );
    	$output['status'] = 'fail';
    	$output['error'] = 'duplicate';
    	$output['rating_total'] = $post_reviews['rating'];
    	$output['rating_count'] = $post_reviews['count'];
    	$output['html'] = wp_review_rating( $post_reviews['rating'], $commentdata['comment_post_ID'], array( 'user_rating' => true ) );
    	echo wp_json_encode( $output );
    	exit;
    } );
    

    with

    
    function wp_review_comment_duplicate_trigger( $commentdata ) {
        $post_reviews = mts_get_post_reviews( $commentdata['comment_post_ID'] );
        $output['status'] = 'fail';
        $output['error'] = 'duplicate';
        $output['rating_total'] = $post_reviews['rating'];
        $output['rating_count'] = $post_reviews['count'];
        $output['html'] = wp_review_rating( $post_reviews['rating'], $commentdata['comment_post_ID'], array( 'user_rating' => true ) );
        echo wp_json_encode( $output );
        exit;
    }
    add_action( 'comment_duplicate_trigger', 'wp_review_comment_duplicate_trigger' );
    

    We’ll make sure to update this in the future to provide support for older versions of PHP.

    Thank you

Viewing 1 replies (of 1 total)
  • The topic ‘unable to install – bug all site’ is closed to new replies.