Title: Plugin caused a fatal error
Last modified: September 29, 2023

---

# Plugin caused a fatal error

 *  Resolved [jorenmartijn](https://wordpress.org/support/users/jorenmartijn/)
 * (@jorenmartijn)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/plugin-caused-a-fatal-error/)
 * Yesterday I got an alert about a client site not functioning correctly.
 * I narrowed the problem down to this one and managed to partially ‘fix’ the problem
   by casting the variable inside the round() function to (int), but that doesn’t
   fix the issue of the tier prices showing as 0.00. All other products seem to 
   work fine, as you’d expect them to. Changing the separator in the percentages
   to a . instead of a , doesn’t seem to make a difference.
 * Can you see what causes the issue in the code based on the below error?
 * `Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type
   int|float, string given in /www/promolijn_373/public/wp-content/plugins/tier-
   pricing-table/views/frontend/tiered-pricing-table.php:178 Stack trace: #0 /www/
   promolijn_373/public/wp-content/plugins/tier-pricing-table/views/frontend/tiered-
   pricing-table.php(178): round('7,4074', 2) #1 /www/promolijn_373/public/wp-content/
   plugins/tier-pricing-table/src/Core/FileManager.php(110): include('/www/promolijn_...')#
   2 /www/promolijn_373/public/wp-content/plugins/tier-pricing-table/src/PricingTable.
   php(132): TierPricingTable\Core\FileManager->includeTemplate('/www/promolijn_...',
   Array) #3 /www/promolijn_373/public/wp-content/plugins/tier-pricing-table/src/
   PricingTable.php(79): TierPricingTable\PricingTable->renderPricingTableHTML(Object(
   WC_Product_Variable), Object(WC_Product_Variation), Array) #4 /www/promolijn_373/
   public/wp-content/plugins/tier-pricing-table/src/Frontend/ProductPageHandler.
   php(190): TierPricingTable\PricingTable->renderPricingTable(399, '4851') #5 /
   www/promolijn_373/public/wp-includes/class-wp-hook.php(310): TierPricingTable\
   Frontend\ProductPageHandler->renderPricingTableOnProductPage('') #6 /www/promolijn_373/
   public/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array) #
   7 /www/promolijn_373/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#
   8 /www/promolijn_373/public/wp-content/plugins/woocommerce/templates/single-product/
   add-to-cart/variable.php(85): do_action('woocommerce_aft...') #9 /www/promolijn_373/
   public/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/
   www/promolijn_...') #10 /www/promolijn_373/public/wp-content/plugins/woocommerce/
   includes/wc-template-functions.php(1756): wc_get_template('single-product/...',
   Array) #11 /www/promolijn_373/public/wp-includes/class-wp-hook.php(310): woocommerce_variable_add_to_cart('')#
   12 /www/promolijn_373/public/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(
   NULL, Array) #13 /www/promolijn_373/public/wp-includes/plugin.php(517): WP_Hook-
   >do_action(Array) #14 /www/promolijn_373/public/wp-content/plugins/woocommerce/
   includes/wc-template-functions.php(1702): do_action('woocommerce_var...') #15/
   www/promolijn_373/public/wp-includes/class-wp-hook.php(310): woocommerce_template_single_add_to_cart('')#
   16 /www/promolijn_373/public/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(
   NULL, Array) #17 /www/promolijn_373/public/wp-includes/plugin.php(517): WP_Hook-
   >do_action(Array) #18 /www/promolijn_373/public/wp-content/themes/flatsome/woocommerce/
   single-product/layouts/product-no-sidebar.php(40): do_action('woocommerce_sin...')#
   19 /www/promolijn_373/public/wp-includes/template.php(787): require('/www/promolijn_...')#
   20 /www/promolijn_373/public/wp-content/plugins/woocommerce/includes/wc-core-
   functions.php(284): load_template('/www/promolijn_...', false) #21 /www/promolijn_373/
   public/wp-content/themes/flatsome/woocommerce/content-single-product.php(42):
   wc_get_template_part('single-product/...', 'no-sidebar') #22 /www/promolijn_373/
   public/wp-includes/template.php(787): require('/www/promolijn_...') #23 /www/
   promolijn_373/public/wp-content/plugins/woocommerce/includes/wc-core-functions.
   php(284): load_template('/www/promolijn_...', false) #24 /www/promolijn_373/public/
   wp-content/themes/flatsome/woocommerce/single-product.php(39): wc_get_template_part('
   content', 'single-product') #25 /www/promolijn_373/public/wp-includes/template-
   loader.php(106): include('/www/promolijn_...') #26 /www/promolijn_373/public/
   wp-blog-header.php(19): require_once('/www/promolijn_...') #27 /www/promolijn_373/
   public/index.php(17): require('/www/promolijn_...') #28 {main} thrown in /www/
   promolijn_373/public/wp-content/plugins/tier-pricing-table/views/frontend/tiered-
   pricing-table.php on line 178`
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-caused-a-fatal-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mykola Lukin](https://wordpress.org/support/users/bycrik/)
 * (@bycrik)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/plugin-caused-a-fatal-error/#post-17088721)
 * Hello @jorenmartijn ,
 * Would you please create a ticket via the woocommerce dashboard?
 * It appears you use a premium version and WordPress does not allow us to provide
   any kind of support for premium users.
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Plugin caused a fatal error’ is closed to new replies.

 * ![](https://ps.w.org/tier-pricing-table/assets/icon-256x256.gif?rev=3025448)
 * [Tiered Pricing Table for WooCommerce](https://wordpress.org/plugins/tier-pricing-table/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tier-pricing-table/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tier-pricing-table/)
 * [Active Topics](https://wordpress.org/support/plugin/tier-pricing-table/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tier-pricing-table/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tier-pricing-table/reviews/)

## Tags

 * [fatal_error](https://wordpress.org/support/topic-tag/fatal_error/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mykola Lukin](https://wordpress.org/support/users/bycrik/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/plugin-caused-a-fatal-error/#post-17088721)
 * Status: resolved