Cannot access offset of type string on string
-
I have upgraded to pro, and now when completing payment, I receive the following error:
2022-04-30T12:03:05+00:00 CRITICAL Uncaught TypeError: Cannot access offset of type string on string in /var/www/html/wp-content/plugins/eh-paypal-express-checkout/includes/class-paypal-express-api.php:2598 Stack trace: #0 /var/www/html/wp-content/plugins/eh-paypal-express-checkout/includes/class-paypal-express-api.php(1509): Eh_PayPal_Express_Payment->shipping_parse() thrown in /var/www/html/wp-content/plugins/eh-paypal-express-checkout/includes/class-paypal-express-api.php on line 2598
If I change the line from
'email' => ($eh_options['smart_button_paypal_allow_override'] == 'yes' ? $post_data['billing_email'] : (isset($response['payer']['email_address']) ? $response['payer']['email_address'] : '')),
to
'email' => ((isset($eh_options['smart_button_paypal_allow_override']) && $eh_options['smart_button_paypal_allow_override'] == 'yes')) ? $post_data['billing_email'] : (isset($response['payer']['email_address']) ? $response['payer']['email_address'] : ''),
Then everything works fine, as far as I can tell.
Please fix this, thank you.
- The topic ‘Cannot access offset of type string on string’ is closed to new replies.