• Hi there, this is Diego from the WPML Compatibility team.

    We found a new compatibility issue with WPML and PHP 8.1, it was reported in this ticket: https://wpml.org/forums/topic/paypal-checkout-error/

    This is the PHP error:

    'PHP Warning: Trying to access array offset on value of type null in /home/869142.clo............ on value of type null in /wp-content/plugins/express-checkout/includes/class-express-checkout-api-request.php on line 160'

    Workaround

    • Open the wp-content/plugins/express-checkout/includes/class-express-checkout-gateway.php file
    • Replace the following snippet:
    $_POST = WC()->session->get('post_data');
    • With
    $_POST = (array) WC()->session->get('post_data');

    Could you please check if it’s possible to implement a fix for this?

    • This topic was modified 1 year, 4 months ago by diegootgs.
  • The topic ‘Compatibility issue with WPML and PHP 8.1’ is closed to new replies.