Title: Flexible Shipping generating repeated array_sum() PHP warnings
Last modified: July 28, 2026

---

# Flexible Shipping generating repeated array_sum() PHP warnings

 *  Resolved [bounceonline](https://wordpress.org/support/users/bounceonline/)
 * (@bounceonline)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/flexible-shipping-generating-repeated-array_sum-php-warnings/)
 * Hello,
 * We are experiencing a large volume of PHP warnings whenever shipping rates associated
   with Flexible Shipping are enabled.
 * The error is:
 * PHP Warning: array_sum(): Addition is not supported on type string in /wp-content/
   plugins/woocommerce/includes/abstracts/abstract-wc-shipping-method.php on line
   316
 * Environment:
    - WordPress: 6.8.1
    - WooCommerce: 9.9.5
    - PHP: 8.3
    - Flexible Shipping: 10.9.4
    - Server: LiteSpeed with MariaDB
 * Our shipping zone contains:
    1. A Flexible Shipping method called “Tiered Shipping”
    2. A native Local Pickup method called “Collect from Shop (Ferndale)”, with the
       Flexible Shipping Rules Table additional-cost option
 * The warning has appeared more than 116,000 times. To isolate it, we conducted
   the following tests:
    - Both methods enabled: warnings occur continuously.
    - Tiered Shipping disabled, Flexible Shipping-enhanced Local Pickup enabled:
      37 warnings were generated in approximately four minutes.
    - Local Pickup disabled, Tiered Shipping enabled: 40 warnings were generated
      in approximately two and a half minutes.
    - Both methods disabled: no array_sum() warnings were generated during the subsequent
      test period.
 * The Tiered Shipping rates are numeric and based on cart price. The Local Pickup
   method has a base cost of R0 and previously used the Flexible Shipping Rules 
   Table to add R50 below a specified cart value.
 * This suggests that one or more Flexible Shipping calculations may be passing 
   WooCommerce a cost array containing an empty or non-numeric string. WooCommerce
   then calls array_sum() on that array.
 * Could you please confirm:
    1. Whether this is a known compatibility issue with PHP 8.3 or our WooCommerce 
       version
    2. Whether Flexible Shipping may return an empty string within the shipping-cost
       array
    3. Whether an update or recommended configuration change resolves it
    4. Whether you need a diagnostic log showing the method ID and contents of the 
       cost array
 * I can provide screenshots, a WooCommerce System Status report and a sanitised
   log excerpt.
 * Kind regards,
 * Chris
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fflexible-shipping-generating-repeated-array_sum-php-warnings%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [grzegorzturbasa](https://wordpress.org/support/users/grzegorzturbasa/)
 * (@grzegorzturbasa)
 * [1 week, 1 day ago](https://wordpress.org/support/topic/flexible-shipping-generating-repeated-array_sum-php-warnings/#post-18979672)
 * Hi Chris,
   thank you for sharing your problem. Can you please send mentioned details(
   screenshots, a WooCommerce System Status report and a sanitised log excerpt) 
   to [help@octolize.com](https://wordpress.org/support/topic/flexible-shipping-generating-repeated-array_sum-php-warnings/help@octolize.com?output_format=md)?
   These will help to replicate your scenario.
 * I would appreciate if you could include the link to this thread to reference 
   it on our side.
 * Kind regards,
   Greg
 *  Plugin Author [grzegorzturbasa](https://wordpress.org/support/users/grzegorzturbasa/)
 * (@grzegorzturbasa)
 * [20 hours ago](https://wordpress.org/support/topic/flexible-shipping-generating-repeated-array_sum-php-warnings/#post-18986855)
 * Dince there are no new replies I’m marking this thread as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fflexible-shipping-generating-repeated-array_sum-php-warnings%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/flexible-shipping/assets/icon.svg?rev=2737045)
 * [Weight Based Shipping Table Rate for WooCommerce – Flexible Shipping](https://wordpress.org/plugins/flexible-shipping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flexible-shipping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flexible-shipping/)
 * [Active Topics](https://wordpress.org/support/plugin/flexible-shipping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flexible-shipping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flexible-shipping/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [grzegorzturbasa](https://wordpress.org/support/users/grzegorzturbasa/)
 * Last activity: [20 hours ago](https://wordpress.org/support/topic/flexible-shipping-generating-repeated-array_sum-php-warnings/#post-18986855)
 * Status: resolved