Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1050394

    Hi, I get many warnings on my functions.php file, line 9. This is the code:

    add_filter('http_request_args', function($r, $url) {
        $r['sslcertificates'] = ABSPATH . '/cacert.pem';
        return $r;
    });
    

    Can you tell me why it causes errors and how I can fix it?

    #1051321

    Hey DROR,

    Thank you for using Enfold.

    What is the actual warning or notification? What is the current PHP version?

    Best regards,
    Ismael

    #1051326
    This reply has been marked as private.
    #1051355

    Hi,

    Add a priority and the number of arguments.

    add_filter('http_request_args', function($r, $url) {
        $r['sslcertificates'] = ABSPATH . '/cacert.pem';
        return $r;
    }, 10, 2);
    

    .. where 10 is the priority value and 2 is number of arguments ($r, $url).

    // https://developer.wordpress.org/reference/hooks/http_request_args/

    Best regards,
    Ismael

    #1051374

    OK, made the update in the functions file.

    Thanks.

    #1051429
    This reply has been marked as private.
    #1051911

    Hi bakbek,

    Errors here are different and are not related to Enfold. They seem to be related to WooCommerce or some plugin.

    Best regards,
    Victoria

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.