• Resolved lulumelon

    (@louisapple)


    hi, there

    i keep receving error message from log as below, please advise the cause and solution thanks

    Uncaught TypeError: Unsupported operand types: float * string in /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php:111 Additional context{ “error”: { “type”: 1, “file”: “/home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php”, “line”: 111 }, “remote-logging”: true, “backtrace”: [ “”, “#0 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(1829): WC_Order_Item_Fee->calculate_taxes()”, “#1 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/src/Internal/Orders/TaxesController.php(50): WC_Abstract_Order->calculate_taxes()”, “#2 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/src/Internal/Orders/TaxesController.php(20): Automattic\WooCommerce\Internal\Orders\TaxesController->calc_line_taxes()”, “#3 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(1487): Automattic\WooCommerce\Internal\Orders\TaxesController->calc_line_taxes_via_ajax()”, “#4 /home4/igrabcom/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::calc_line_taxes()”, “#5 /home4/igrabcom/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”, “#6 /home4/igrabcom/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()”, “#7 /home4/igrabcom/public_html/wp-admin/admin-ajax.php(192): do_action()”, “#8 {main}”, “thrown” ] }2025-07-30T01:49:29+00:00Critical Uncaught TypeError: Unsupported operand types: float * string in /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php:111 Additional context{ “error”: { “type”: 1, “file”: “/home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php”, “line”: 111 }, “remote-logging”: true, “backtrace”: [ “”, “#0 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(1829): WC_Order_Item_Fee->calculate_taxes()”, “#1 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/src/Internal/Orders/CouponsController.php(84): WC_Abstract_Order->calculate_taxes()”, “#2 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/src/Internal/Orders/CouponsController.php(29): Automattic\WooCommerce\Internal\Orders\CouponsController->add_coupon_discount()”, “#3 /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(1269): Automattic\WooCommerce\Internal\Orders\CouponsController->add_coupon_discount_via_ajax()”, “#4 /home4/igrabcom/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::add_coupon_discount()”, “#5 /home4/igrabcom/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”, “#6 /home4/igrabcom/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()”, “#7 /home4/igrabcom/public_html/wp-admin/admin-ajax.php(192): do_action()”, “#8 {main}”, “thrown” ] }2025-07-30T01:51:02+00:00Critical Uncaught TypeError: Unsupported operand types: float * string in /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php:111 Additional context2025-07-30T01:53:00+00:00Critical Uncaught TypeError: Unsupported operand types: float * string in /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php:111 Additional context

    If you like WooCommerce please leave us a ★★★★★ rating. A huge thanks in advance!

    Get Version 6.8.2

Viewing 15 replies - 1 through 15 (of 20 total)
  • Hi,

    The error indicates that you have some extension related to tax calculation, or process that tries to multiply a float ( number ) and a string. This is causing a type error

    Uncaught TypeError: Unsupported operand types: float * string in /home4/igrabcom/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-item-fee.php:111 A

    To help troubleshoot better, please share the system status report of your website from WooCommerce > Status > Get system report . Copy its contents on pastebin.com or gist.github.com and share the link here ( The report is lengthy and it is easier to share this way )

    If you are using any tax calculation or fee calculation related extension, check if that has an update available.

    The error is likely related to PHP 8 compatibility where types are more strictly checked. PHP 7.4 would silently convert a string to a number, but in PHP 8, the plugin author would need to enforce the correct type in their code before passing it on to WooCommerce for calculation.

    • This reply was modified 8 months ago by Nagesh Pai. Reason: More PHP related context
    Thread Starter lulumelon

    (@louisapple)

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @louisapple,

    I understand how concerning it can be to run into repeated fatal errors like this, especially when they involve core WooCommerce functionality. Let’s get this sorted out together.

    Did this issue begin after a recent update to WooCommerce, WordPress, PHP, or any of your extensions? Also, is this error showing up on specific actions or pages like checkout, order edit screen, or admin AJAX requests, or does it appear site-wide?

    Thanks to @nagpai for the earlier response. As he pointed out, the error stems from a calculation involving a float and a string, which PHP 8 enforces more strictly than older versions. This typically happens when a fee or tax value is saved or passed incorrectly as a string rather than a number.

    To move forward, please share your System Status Report by going to WooCommerce → Status → Get system report, then paste it into https://pastebin.com or https://gist.github.com and share the link here. This will help us review your active plugins, PHP version, and any relevant WooCommerce settings.

    Looking forward to your update so we can help you resolve this promptly. Let’s see how it goes!

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @louisapple,

    Thanks for sharing your System Status Report so quickly. That’s super helpful.

    From the report, I noticed your site is currently running WordPress version 6.8.1 while 6.8.2 is available, and WooCommerce is still on version 9.8.5 with a matching database version. I recommend updating both WordPress and WooCommerce to their latest versions, as newer versions often include important compatibility and bug fixes that may resolve this PHP 8-related error.

    Once the updates are done, please test again to see if the fatal error persists. If it does, we can proceed with a plugin and theme conflict test to identify which plugin is triggering the type mismatch during fee or tax calculations. For plugin conflict test, here is a guide to follow: https://woocommerce.com/document/how-to-test-for-conflicts/#deactivation-and-testing

    Let’s see how it goes!

    Also, if the updates do not work, check if your extensions or code snippets have any custom code that modifies coupons or taxes. Since the backtrace mentions coupons too.

    Thread Starter lulumelon

    (@louisapple)

    i am not sure if something to do with this , i opened a thread last month and change the setting WooCommerce → Settings → Tax → Tax Options → Shipping tax class.

    https://wordpress.org/support/topic/gst-not-come-up-properly/

    Hi @louisapple,

    Thank you for getting back.

    Regarding the error you’re encountering — as my colleague mentioned, it typically happens when data is stored in the database in an invalid format. For example, trying to multiply a decimal with a letter or word, which isn’t mathematically possible. This kind of issue often stems from plugins that add custom fees using the wrong format, incorrect tax rate configurations, or plugin conflicts.

    After checking your setup, I noticed you’re using several plugins that could potentially be involved, including:

    • WooCommerce Wholesale Prices Premium/Basic
    • Australia Post WooCommerce Extension Pro
    • AutomateWoo
    • Back In Stock Notifier
    • Pixel Manager for WooCommerce

    To properly troubleshoot, you’ll need to perform a conflict test.

    I recommend cloning your site to a subdomain, directory, or staging environment. From there:

    1. Deactivate all plugins except WooCommerce and your payment gateway.
    2. Set the payment method to sandbox/test mode.
    3. Clear your logs.
    4. Try checking out with a test product.
    5. Review the logs again.

    When responding, can you also confirm if your shipping tax class is set to standard or shipping tax class based on cart items?

    Thread Starter lulumelon

    (@louisapple)

    i have set the shipping tax class is set to standard

    I have tried checking out with a test product with bank transfer, there is no error log come up, but i did not deactivate all plugins as i need those to trigger error.

    And i also notice that the error log come up all at mid night i suppose it was not come up until then?

    Can you try doing a checkout after adding any discount coupon and using an address that triggers a tax calculation, and then doing a checkout?

    Thread Starter lulumelon

    (@louisapple)

    yeah i just try using a coupon and using a delivery address rather than pickup , shall i just wait to see the log as i can see there is no error come up yet

    Sure, you can wait for the next error to popup and see if there are any other errors around that time. Also try to see with what order the error could be related ( using the timestamp ). See if that order has anything peculiar – e.g. – prompted by AutomateWoo, using any specific coupons or tax situations.

    If you have updated WooCommerce and other extensions as prompted by the staff earlier, that could resolve issues too. Are you seeing any errors after doing that?

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thanks for the update!

    Yes, since the error usually shows up around midnight and doesn’t appear immediately during checkout, it makes sense to wait and see if it gets logged after your recent test using a coupon and delivery address.

    By the way, have you had a chance to update WordPress and WooCommerce, as my colleague previously suggested? If not, we recommend creating a staging site first so you can safely perform the updates without affecting your live store. You can use a plugin like WP Staging to quickly set that up.

    If you’ve already updated both WordPress and WooCommerce, did you notice any errors afterward? That could also help us narrow down what’s causing the issue.

    Let us know what you find!

    Thread Starter lulumelon

    (@louisapple)

    i am testing on the stage site, there was no fatal error come up even i wait till now, i suppose it has nothing to do with the ordering in that case?

    Hi @louisapple,

    Thank you for the clarification, and I appreciate you going through the tests. From what you’ve shared, it appears the issue only occurred once and you haven’t been able to reproduce it, even on the staging site — is that correct?

    In this case, troubleshooting will be difficult since we haven’t identified the root cause yet. Here’s what I recommend: keep an eye on your site’s logs, and if the error happens again, take note of any related activity at that time — such as an order, a failed transaction, or anything unusual. This context will help guide the next steps in reproducing and resolving the issue.

Viewing 15 replies - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.