Fatal error in cart, product page
-
The PayPal buttons work on checkout, but not in cart or product pages. I get the following php fatal error:
PHP Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, null given in /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php:320 Stack trace: #0 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php(320): round() #1 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php(267): WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit->ditch_items_when_mismatch() #2 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-order.php(222): WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit->to_array() #3 [internal function]: WooCommerce\PayPalCommerce\ApiClient\Entity\Order::WooCommerce\PayPalCommerce\ApiClient\Entity\{closure}() #4 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-order.php(224): array_map() #5 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php(186): WooCommerce\PayPalCommerce\ApiClient\Entity\Order->to_array() #6 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/class-buttonmodule.php(150): WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint->handle_request() #7 /wp-includes/class-wp-hook.php(303): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}() #8 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #9 /wp-includes/plugin.php(470): WP_Hook->do_action() #10 /wp-content/plugins/woocommerce/includes/class-wc-ajax.php(90): do_action() #11 /wp-includes/class-wp-hook.php(303): WC_AJAX::do_wc_ajax() #12 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #13 /wp-includes/plugin.php(470): WP_Hook->do_action() #14 /wp-includes/template-loader.php(13): do_action() #15 /wp-blog-header.php(19): require_once('/usr/www/users/...') #16 /index.php(17): require('/usr/www/users/...') #17 {main} thrown in /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php on line 320
WP 5.8-RC3-51429
Plugins:
WC 5.5.0
No other PluginsThemes:
Twenty Twenty-One: 1.3
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Fatal error in cart, product page’ is closed to new replies.