• Resolved jorenmartijn

    (@jorenmartijn)


    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 to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Mykola Lukin

    (@bycrik)

    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.