Critical Error When using Simple product Discount Pricing option
-
Im using the pro version of this plugin with the astra theme and whenever i setup a simple “all products’ discount across the store; the site breaks downs in the frontend with a critical error.
-
Hello @rankengage
Thank you for choosing our plugin.
We apologize for the inconvenience.
Please enable debugging on your website and let us know more details about the error message.
Add below lines to your wp-config.php file to enable debugging and debug log.
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );After enabling debug and getting errors inside the debug.log file disable debugging by setting true to false in above lines like the below example.
define( ‘WP_DEBUG’, false );
define( ‘WP_DEBUG_LOG’, false );Best Regards
Hi @emilywil
This is the fatal error log:[11-Jul-2024 19:53:55 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string – float in /var/web/staging/public_html/wp-content/plugins/bb-ultimate-addon/modules/uabb-woo-products/templates/loop/sale-flash.php:32
PHP Stacktrace:
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
– undefined
/var/web/staging/public_html/wp-content/plugins/bb-ultimate-addon/modules/uabb-woo-products/templates/content-product-modern.php(56): include()
/var/web/staging/public_html/wp-content/plugins/bb-ultimate-addon/modules/uabb-woo-products/uabb-woo-products.php(371): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-ultimate-addon/modules/uabb-woo-products/uabb-woo-products.php(395): UABBWooProductsModule->render_woo_loop_template()
/var/web/staging/public_html/wp-content/plugins/bb-ultimate-addon/modules/uabb-woo-products/includes/frontend.php(24): UABBWooProductsModule->render_woo_loop()
/var/web/staging/public_html/wp-content/plugins/bb-plugin/includes/module-content.php(8): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-plugin/includes/module.php(4): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(3033): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2984): FLBuilder::render_module(Object(stdClass))
/var/web/staging/public_html/wp-content/plugins/bb-plugin/includes/column.php(3): FLBuilder::render_modules(Object(stdClass))
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2844): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-plugin/includes/column-group.php(7): FLBuilder::render_column(Object(stdClass))
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2755): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-plugin/includes/row.php(13): FLBuilder::render_column_group(Object(stdClass))
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2525): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2486): FLBuilder::render_row(Object(stdClass))
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2254): FLBuilder::render_rows()
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2107): FLBuilder::render_nodes()
/var/web/staging/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(2182): FLBuilder::render_content_by_id(383)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(324): FLBuilder::render_content(‘\n\n\t<h2>\n\t\t\t\tNew…’)
/var/web/staging/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘\n\n\t<h2>\n\t\t\t\tNew…’, Array)
/var/web/staging/public_html/wp-includes/post-template.php(256): apply_filters(‘the_content’, ‘<!– wp:fl-buil…’)
/var/web/staging/public_html/wp-content/themes/astra/template-parts/single/content-header.php(33): the_content()
/var/web/staging/public_html/wp-includes/template.php(812): require(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-includes/template.php(745): load_template(‘/var/web/stagin…’, false, Array)
/var/web/staging/public_html/wp-includes/general-template.php(206): locate_template(Array, true, false, Array)
/var/web/staging/public_html/wp-content/themes/astra/inc/template-parts.php(376): get_template_part(‘template-parts/…’)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(324): astra_entry_content_single_page_template(”)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
/var/web/staging/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
/var/web/staging/public_html/wp-content/themes/astra/inc/core/theme-hooks.php(452): do_action(‘astra_entry_con…’)
/var/web/staging/public_html/wp-content/themes/astra/template-parts/content-page.php(26): astra_entry_content_single_page()
/var/web/staging/public_html/wp-includes/template.php(812): require(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-includes/template.php(745): load_template(‘/var/web/stagin…’, false, Array)
/var/web/staging/public_html/wp-includes/general-template.php(206): locate_template(Array, true, false, Array)
/var/web/staging/public_html/wp-content/themes/astra/inc/class-astra-loop.php(111): get_template_part(‘template-parts/…’, ‘page’)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(324): Astra_Loop->template_parts_page(”)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
/var/web/staging/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
/var/web/staging/public_html/wp-content/themes/astra/inc/class-astra-loop.php(199): do_action(‘astra_page_temp…’)
/var/web/staging/public_html/wp-content/themes/astra/inc/class-astra-loop.php(176): Astra_Loop->loop_markup(true)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(324): Astra_Loop->loop_markup_page(”)
/var/web/staging/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
/var/web/staging/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
/var/web/staging/public_html/wp-content/themes/astra/inc/core/theme-hooks.php(267): do_action(‘astra_content_p…’)
/var/web/staging/public_html/wp-content/themes/astra/page.php(32): astra_content_page_loop()
/var/web/staging/public_html/wp-includes/template-loader.php(106): include(‘/var/web/stagin…’)
/var/web/staging/public_html/wp-blog-header.php(19): require_once(‘/var/web/stagin…’)
/var/web/staging/public_html/index.php(17): require(‘/var/web/stagin…’)
{main} thrown in /var/web/staging/public_html/wp-content/plugins/bb-ultimate-addon/modules/uabb-woo-products/templates/loop/sale-flash.php on line 32Just to reiterate again; I’ve only seen this happen when simple discount is set storewide for all products. The moment I shut this off; the critical error will disappear. Here is a screenshot of settings.
Kind RegardsHello @rankengage
Thank you for the error message.
Regarding the error message it is related to the
bb-ultimate-addon
plugin on your website.bb-ultimate-addon/modules/uabb-woo-products/templates/loop/sale-flash.php:32
The plugin flash sales are working fine and you can try it on our demo website. However the
bb-ultimate-addon
causes issue on your website.You can disable the plugin sale flash, by following the below steps.
- Refer to the plugin settings – general tab – product pricing section.
- Disable the “Show Sale Badge” options for all of the pricing rules including “simple” pricing rules.
Regarding the error message you can contact the
bb-ultimate-addon
and send them the error message.I hope it helps.
Best Regards
Hi @emilywil
I have gone ahead and disabled the “show sale badge” options as you recommended. However it has not helped fix the error.
Yes, I understand Astra’s ultimate beaver builder addon plugin is showing the php critical error in the logs; however that is only because something is conflicting with your plugin (maybe the naming conventions in the code regarding “sales badges” are in conflict); however I can raise this up with them too; not a problem.
I’ve opened another thread regarding another issue I’ve been facing regarding the “discount page”; I’m hoping you would look into that soon.
Kind RegardsHi @rankengage
You can change the “Sale badge type” to the “Sale” and try again. It is under the “Show sale badge” option.
In case the above tip can not help you, please contact the
bb-ultimate-addon
regarding these error messages.Best Regards
Hi @emilywil
Your last suggestion might’ve worked or I also had to deactivate the plugin again and reset to default settings for it to work but the critical error for simple discount pricing for all products is now working.
Thank youHi @rankengage
You are welcome.
In case you get the error message, it is related to your
bb-ultimate-addon
and you should contact them regarding these error messages.Regards
- You must be logged in to reply to this topic.