Title: Cannot access offset of type string on string
Last modified: April 30, 2022

---

# Cannot access offset of type string on string

 *  Resolved [ralekarts](https://wordpress.org/support/users/ralekarts/)
 * (@ralekarts)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/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.

Viewing 1 replies (of 1 total)

 *  Plugin Author [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * (@webtoffee)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cannot-access-offset-of-type-string-on-string/#post-15608520)
 * Hi [@ralekarts](https://wordpress.org/support/users/ralekarts/),
 * Greetings from WebToffee
 * Since it is not advisable to discuss the pro features in this forum, we request
   you to please reach out to our [support](https://www.webtoffee.com/contact/).

Viewing 1 replies (of 1 total)

The topic ‘Cannot access offset of type string on string’ is closed to new replies.

 * ![](https://ps.w.org/express-checkout-paypal-payment-gateway-for-woocommerce/
   assets/icon-256x256.gif?rev=3385064)
 * [Payment Gateway of PayPal for WooCommerce](https://wordpress.org/plugins/express-checkout-paypal-payment-gateway-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/express-checkout-paypal-payment-gateway-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/express-checkout-paypal-payment-gateway-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/express-checkout-paypal-payment-gateway-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/express-checkout-paypal-payment-gateway-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/express-checkout-paypal-payment-gateway-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/cannot-access-offset-of-type-string-on-string/#post-15608520)
 * Status: resolved