Critical error on cart page since recent WP and Woo update
-
Hi,
Ever since I updated to the last versions of WP (v6.7.2) and WooCommerce (v9.6.2) I get the following errors on the cart page (only when this plugin is activated and when decimal quantity products are added to cart):
Deprecated: Implicit conversion from float 0.5 to int loses precision in (…)/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php on line 85
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in (…)/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php:95 Stack trace: #0 (…)plugins/woocommerce/src/StoreApi/Utilities/CartController.php(49): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->normalize_cart_item_quantity() #1 (…)/plugins/woocommerce/src/StoreApi/Routes/V1/AbstractCartRoute.php(180): Automattic\WooCommerce\StoreApi\Utilities\CartController->normalize_cart() #2 (…)/plugins/woocommerce/src/StoreApi/Routes/V1/AbstractCartRoute.php(114): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractCartRoute->load_cart_session() #3 [internal function]: Automattic\WooCommerce\StoreApi\Routes\V1\AbstractCartRoute->get_response() #4 (…)/plugins/woocommerce/src/Blocks/Domain/Services/Hydration.php(155): call_user_func_array() #5 (…)/plugins/woocommerce/src/Blocks/Domain/Services/Hydration.php(65): Automattic\WooCommerce\Blocks\Domain\Services\Hydration->get_response_from_controller() #6 (…)/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(322): Automattic\WooCommerce\Blocks\Domain\Services\Hydration->get_rest_api_response_data() #7 (…)/plugins/woocommerce/src/Blocks/BlockTypes/Cart.php(257): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->hydrate_api_request() #8 (…)/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(416): Automattic\WooCommerce\Blocks\BlockTypes\Cart->enqueue_data() #9 (…)/plugins/woocommerce/src/Blocks/BlockTypes/Cart.php(147): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_assets() #10 (…)/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(96): Automattic\WooCommerce\Blocks\BlockTypes\Cart->enqueue_assets() #11 (…)/wp-includes/class-wp-block.php(537): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->render_callback() #12 (…)/wp-includes/blocks.php(2191): WP_Block->render() #13 (…)/wp-includes/blocks.php(2243): render_block() #14 (…)/wp-includes/class-wp-hook.php(324): do_blocks() #15 (…)/wp-includes/plugin.php(205): WP_Hook->apply_filters() #16 (…)/wp-includes/post-template.php(256): apply_filters() #17 (…)/themes/storefront/inc/storefront-template-functions.php(352): the_content() #18 (…)/wp-includes/class-wp-hook.php(324): storefront_page_content() #19 (…)/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #20 (…)/wp-includes/plugin.php(517): WP_Hook->do_action() #21 (…)/themes/storefront/content-page.php(18): do_action() #22 (…)/wp-includes/template.php(812): require(‘/home/(…)…’) #23 (…)/wp-includes/template.php(745): load_template() #24 (…)/wp-includes/general-template.php(206): locate_template() #25 (…)/themes/storefront/template-fullwidth.php(21): get_template_part() #26 (…)/wp-includes/template-loader.php(106): include(‘/home/(…)…’) #27 (…)/wp-blog-header.php(19): require_once(‘/home/(…)…’) #28 (…)/index.php(17): require(‘/home/(…)…’) #29 {main} thrown in (…)/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php on line 95
I’m using Storefront theme and I have tested this without any other plugins or customizations activated and using a local environment to test before and after last WP and WooCommerce update and only after the last update this error comes up.
Looking forward to your help ASAP.
Best
The topic ‘Critical error on cart page since recent WP and Woo update’ is closed to new replies.