• Resolved savastgfx

    (@savastgfx)


    I receive this error when i try to activate the plugin… I install it on other themes and i have no problem. I don’t know what can be the problem now. Thanks.

    Parse error: syntax error, unexpected T_FUNCTION in /home/public_html/www.sitename.com/wp-content/plugins/woocommerce-pay-per-post/woocommerce-payperpost.php on line 152

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Matt Pramschufer

    (@mattpramschufer)

    You are running a very old version of PHP. You can upgrade to at least version 5.3 of PHP or you can comment out that line of code. It turns off comments.

    Thread Starter savastgfx

    (@savastgfx)

    Thanks for your answer. I try to remove that line but i have the same problem with next line. It is a problem if i remove the other line etc…

    Thanks for your quick answer.

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    you need to remove the entire filter. So comment out or delete all of the lines below.

    //Turn off comments for pages user doesn’t have access to.
    add_filter(‘comments_open’, function () {
    return false;
    });

    Thread Starter savastgfx

    (@savastgfx)

    Hi, It worked after i delete this line, but now i have another error. Can this be solved? “Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Woocommerce_PayPerPost::render’ was given in /home/public_html/www.sitename.com/wp-includes/class-wp-hook.php on line 298”. Thanks.

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    What version of wordpress are you running, what version of php are you running? Where does that warning appear? That isn’t an error just a warning, but it still should not be happening.

    Thread Starter savastgfx

    (@savastgfx)

    Hi, I am using the latest version of WordPress and php version is 5.2… this warning substitute post excerpt.

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    you can easily hide those warnings by simply turning error reporting off. Take a look at https://wordimpress.com/php-turn-on-or-off-error-reporting/

    I would recommend upgrading PHP as that will remove the warning, but if you cant then hide the notice.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error when try to install plugin’ is closed to new replies.