• Resolved tbo460

    (@thibotus01)


    Hi,

    2.0.2 plugin version

    I’m getting this warning in php logs:

    AH01071: Got error 'PHP message: PHP Warning: Undefined property: WooCommerce::$payment_gateways in /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php on line 102', referer: ../wp-admin/

    But not sure if this is related with PHP 8.1 or not.

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @thibotus01

    You previously reported this error on the last pre-release version, where the function expects a bool but received a null and crashed as a result of type hinting. This error was addressed in this PR for the 2.0.2 release by explicitly checking that it is not null.
    But why this would be null for you to begin with was not quite clear to us. When WooCommerce::$payment_gateways is undefined, that would make more sense, though, it is still not clear why this would not be defined.
    Most likely, this results from a third-party plugin conflict, but it’s difficult to pinpoint.

    It should not be directly related to PHP 8.1 as we are not seeing any other reports and also can’t reproduce it on this, or any other PHP version.

    If you can reproduce the warning, our recommendation would be first performing a conflict test with only WooCommerce and PayPal Payments active to potentially rule out the involvement of any third-party plugins.
    Please let us know if the warning still occurs for you then. Thanks!

    Kind regards,
    Niklas

Viewing 1 replies (of 1 total)
  • The topic ‘2.0.2 PHP Warning PHP 8.1?’ is closed to new replies.