• I get the following fatal error on the cart page while using your plugin on the latest WooCommerce themes (Bookix, Eben, etc.).

    Fatal error: Uncaught TypeError: Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits::limit_to_multiple(): Argument #1 ($number) must be of type int, string given, called in /wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php on line 58 and defined in /wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php:72 Stack trace: #0 /wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php(58): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->limit_to_multiple(”, ”, ‘ceil’) #1 /wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/ProductSchema.php(487): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->get_add_to_cart_limits(Object(WC_Product_Simple)) #2 [internal function]: Automattic\WooCommerce\StoreApi\Schemas\V1\ProductSchema->get_item_response(Object(WC_Product_Simple)) #3 /wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractProductGrid.php(114): array_map(Array, Array) #4 /wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(97): Automattic\WooCommerce\Blocks\BlockTypes\AbstractProductGrid->render(Array, ”, Object(WP_Block)) #5 /wp-includes/class-wp-block.php(463): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->render_callback(Array, ”, Object(WP_Block)) #6 /wp-includes/class-wp-block.php(443): WP_Block->render() #7 /wp-includes/class-wp-block.php(443): WP_Block->render() #8 /wp-includes/class-wp-block.php(443): WP_Block->render() #9 /wp-includes/class-wp-block.php(443): WP_Block->render() #10 /wp-includes/blocks.php(1705): WP_Block->render() #11 /wp-includes/blocks.php(1743): render_block(Array) #12 /wp-includes/block-template.php(260): do_blocks(‘<!– wp:templat…’) #13 /wp-includes/template-canvas.php(12): get_the_block_template_html() #14 /wp-includes/template-loader.php(106): include(‘/www/sundayscho…’) #15 /wp-blog-header.php(19): require_once(‘/www/sundayscho…’) #16 /index.php(17): require(‘/www/sundayscho…’) #17 {main} thrown in /wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php on line 72

    • This topic was modified 6 months, 4 weeks ago by joshkern.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi @joshkern,

    Thanks for reaching out.

    I have escalated this with our development team. They will get back to you as soon as possible.

    Kind regards.

    Plugin Contributor Kousik Mukherjee

    (@kousikmukherjeeli)

    Hi @joshkern,

    Please try enabling this option in the settings as mentioned below:
    Product Quantity > Advanced > WooCommerce Block Compatibility

    Regards,
    Kousik Mukherjee

    Thread Starter joshkern

    (@joshkern)

    Hello @kousikmukherjeeli,

    I tried but the issue remains. The only difference in the error message:

    From Stack trace: #0 /wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php(58): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->limit_to_multiple(”, ”, ‘ceil‘)

    To Stack trace: #0 /wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php(59): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->limit_to_multiple(”, 1, ‘floor‘)

    Plugin Contributor Kousik Mukherjee

    (@kousikmukherjeeli)

    Hello,

    Please confirm a few things for us:

    1. The entire error message you are currently receiving.
    2. The settings for minimum, maximum, step, and area.
    3. In the general settings, whether decimals are enabled or not.

    You can also send these details via this email here in link

    Regards
    Kousik Mukherjee

    Thread Starter joshkern

    (@joshkern)

    1. Error message below
    2. The cart error happens to all products on the website, regardless of whether they product has these fields defined.
    3. The error happens with or without decimals enabled.

    Have you tried replicating the issue on your end?

    Fatal error: Uncaught TypeError: Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits::limit_to_multiple(): Argument #1 ($number) must be of type int, string given, called in /www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php on line 59 and defined in /www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php:72 Stack trace: #0 /www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php(59): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->limit_to_multiple(”, 1, ‘floor’) #1 /www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/ProductSchema.php(487): Automattic\WooCommerce\StoreApi\Utilities\QuantityLimits->get_add_to_cart_limits(Object(WC_Product_Simple)) #2 [internal function]: Automattic\WooCommerce\StoreApi\Schemas\V1\ProductSchema->get_item_response(Object(WC_Product_Simple)) #3 /www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractProductGrid.php(114): array_map(Array, Array) #4 /www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(97): Automattic\WooCommerce\Blocks\BlockTypes\AbstractProductGrid->render(Array, ”, Object(WP_Block)) #5 /www/sundayschooldirect_543/public/wp-includes/class-wp-block.php(463): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->render_callback(Array, ”, Object(WP_Block)) #6 /www/sundayschooldirect_543/public/wp-includes/class-wp-block.php(443): WP_Block->render() #7 /www/sundayschooldirect_543/public/wp-includes/class-wp-block.php(443): WP_Block->render() #8 /www/sundayschooldirect_543/public/wp-includes/class-wp-block.php(443): WP_Block->render() #9 /www/sundayschooldirect_543/public/wp-includes/class-wp-block.php(443): WP_Block->render() #10 /www/sundayschooldirect_543/public/wp-includes/blocks.php(1705): WP_Block->render() #11 /www/sundayschooldirect_543/public/wp-includes/blocks.php(1743): render_block(Array) #12 /www/sundayschooldirect_543/public/wp-includes/block-template.php(260): do_blocks(‘<!– wp:templat…’) #13 /www/sundayschooldirect_543/public/wp-includes/template-canvas.php(12): get_the_block_template_html() #14 /www/sundayschooldirect_543/public/wp-includes/template-loader.php(106): include(‘/www/sundayscho…’) #15 /www/sundayschooldirect_543/public/wp-blog-header.php(19): require_once(‘/www/sundayscho…’) #16 /www/sundayschooldirect_543/public/index.php(17): require(‘/www/sundayscho…’) #17 {main} thrown in?/www/sundayschooldirect_543/public/wp-content/plugins/woocommerce/src/StoreApi/Utilities/QuantityLimits.php?on line?72

    There has been a critical error on this website.

    Thread Starter joshkern

    (@joshkern)

    I can provide login info for staging website if needed.

    Plugin Contributor Kousik Mukherjee

    (@kousikmukherjeeli)

    Hello @joshkern,
    please send us access to the staging site.

    From our side, we are not able to reproduce this issue, so it will be helpful to get the staging site to fix it.

    Regards
    Kousik Mukherjee

    Hi! I have the same problem. Were you able to fix it?

    In my case it happens when maximum quantity is enabled.

    • This reply was modified 1 month, 1 week ago by samrot.

    Hi Samrot,

    I hope this message finds you well. Thank you for reaching out to us.

    Please try the solutions suggested by Kousik Mukherjee in the previous responses.

    If the issue continues, don’t hesitate to let us know.

    Best regards,
     

    Yes I tried but the error continues. It only happens when we have the maximum setting enabled.

    Plugin Contributor Birendra Maharjan

    (@aegkr)

    Hi,

    We’ve just released v4.7.0, which addresses the fatal error you reported. Please let us know if everything is working fine now.

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.