Title: Uncaught TypeError
Last modified: September 12, 2023

---

# Uncaught TypeError

 *  Resolved [one3rdnerd](https://wordpress.org/support/users/one3rdnerd/)
 * (@one3rdnerd)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/uncaught-typeerror-80/)
 * There’s an error breaking my site with the latest version of WooCommerce and 
   WooCommerce PayPal Payments.
 * See the error below:
 * **Fatal error**: Uncaught TypeError: Return value of WooCommerce\PayPalCommerce\
   Button\Assets\SmartButton::intent() must be of the type string, null returned
   in /home/customer/www/pureherba.com/public_html/wp-content/plugins/woocommerce-
   paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1551 Stack trace:#
   0 /home/customer/www/pureherba.com/public_html/wp-content/plugins/woocommerce-
   paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(1014): WooCommerce\
   PayPalCommerce\Button\Assets\SmartButton->intent() #1 /home/customer/www/pureherba.
   com/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/
   src/Assets/SmartButton.php(816): WooCommerce\PayPalCommerce\Button\Assets\SmartButton-
   >url_params() #2 /home/customer/www/pureherba.com/public_html/wp-content/plugins/
   woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(614):
   WooCommerce\PayPalCommerce\Button\Assets\SmartButton->script_data() #3 /home/
   customer/www/pureherba.com/public_html/wp-content/plugins/woocommerce-p in **/
   home/customer/www/pureherba.com/public_html/wp-content/plugins/woocommerce-paypal-
   payments/modules/ppcp-button/src/Assets/SmartButton.php** on line **1551**
 * Are you aware of this? Is this happening for anyone else?

Viewing 1 replies (of 1 total)

 *  Thread Starter [one3rdnerd](https://wordpress.org/support/users/one3rdnerd/)
 * (@one3rdnerd)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/uncaught-typeerror-80/#post-17045834)
 * I found a fix on [https://github.com/woocommerce/woocommerce-paypal-payments/issues/1439](https://github.com/woocommerce/woocommerce-paypal-payments/issues/1439)
   but I still think the plugin devs should resolve what causes this in the first
   place.
 * > > I found just disabling and resetting the smart button locations seemed to
   > > solved it. Maybe it needed to be reassigned for a woo-commerce database update
   >  [https://github.com/woocommerce/woocommerce-paypal-payments/issues/1439](https://github.com/woocommerce/woocommerce-paypal-payments/issues/1439)

Viewing 1 replies (of 1 total)

The topic ‘Uncaught TypeError’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-paypal-payments/assets/icon-256x256.png?rev=
   3234615)
 * [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-paypal-payments/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [one3rdnerd](https://wordpress.org/support/users/one3rdnerd/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/uncaught-typeerror-80/#post-17045834)
 * Status: resolved