Title: Unsupported operand types: string * float
Last modified: June 16, 2025

---

# Unsupported operand types: string * float

 *  Resolved [ergec](https://wordpress.org/support/users/ergec/)
 * (@ergec)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/)
 * Hello,
 * After WP updates, I got this error.
 * Type of **$rate->cost** is **string**
 *     ```wp-block-code
       PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * float in [REDACTED]/wp-content/plugins/woocommerce-currency-switcher/classes/woocs.php:4136Stack trace:#0 [REDACTED]/wp-includes/class-wp-hook.php(324): WOOCS->woocommerce_package_rates()#1 [REDACTED]/wp-includes/plugin.php(205): WP_Hook->apply_filters()#2 [REDACTED]/wp-content/plugins/woocommerce/includes/class-wc-shipping.php(395): apply_filters()#3 [REDACTED]/wp-content/plugins/woocommerce/includes/class-wc-shipping.php(261): WC_Shipping->calculate_shipping_for_package()#4 [REDACTED]/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1503): WC_Shipping->calculate_shipping()#5 [REDACTED]/wp-content/plugins/woocommerce/includes/class-wc-...
       ```
   

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

 *  Plugin Support [mediawebster](https://wordpress.org/support/users/mediawebster/)
 * (@mediawebster)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/#post-18513944)
 * Hello
 * Please read this – [https://pluginus.net/support/topic/fatal-php-error-in-woocommerce_package_rates-unsupported-operand-types-string-float/](https://pluginus.net/support/topic/fatal-php-error-in-woocommerce_package_rates-unsupported-operand-types-string-float/)
 *  [aderjanos](https://wordpress.org/support/users/aderjanos/)
 * (@aderjanos)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/#post-18517288)
 * Sneaky error. I discovered it by accident. Initially pages will load fine unless
   you’re browsing for longer.
 *  Plugin Support [mediawebster](https://wordpress.org/support/users/mediawebster/)
 * (@mediawebster)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/#post-18517751)
 * Hello
 * We are already preparing an update with a fix.
 *  [dazman88](https://wordpress.org/support/users/dazman88/)
 * (@dazman88)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/#post-18540332)
 * I have a similar error since latest version (Version 1.4.3), but randomly, only
   on some product pages:
   Uncaught Error: Unsupported operand types: string / intin
   wp-content/plugins/woocommerce-currency-switcher/classes/woocs.php:5505
 *  Plugin Support [mediawebster](https://wordpress.org/support/users/mediawebster/)
 * (@mediawebster)
 * [11 months ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/#post-18547502)
 * Hello [@dazman88](https://wordpress.org/support/users/dazman88/)
 * Try in file – wp-content\plugins\woocommerce-currency-switcher\classes\woocs.
   php – add this code – [https://share.pluginus.net/image/i20250709121928.png](https://share.pluginus.net/image/i20250709121928.png)
   and do a test

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

The topic ‘Unsupported operand types: string * float’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-currency-switcher/assets/icon-256x256.png?rev
   =2844633)
 * [FOX - Currency Switcher Professional for WooCommerce](https://wordpress.org/plugins/woocommerce-currency-switcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-currency-switcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-currency-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-currency-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-currency-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-currency-switcher/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [mediawebster](https://wordpress.org/support/users/mediawebster/)
 * Last activity: [11 months ago](https://wordpress.org/support/topic/unsupported-operand-types-string-float/#post-18547502)
 * Status: resolved