Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting fatal error with PHP 8.1.17. #136

Closed
Chetna1510 opened this issue May 1, 2023 · 0 comments · Fixed by #137
Closed

Getting fatal error with PHP 8.1.17. #136

Chetna1510 opened this issue May 1, 2023 · 0 comments · Fixed by #137
Assignees
Labels
client issue Reported by a client type: bug Something isn't working
Milestone

Comments

@Chetna1510
Copy link

Describe the bug

2023-04-18T23:36:43+00:00 CRITICAL Uncaught TypeError: Unsupported operand types: float + string in /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/checkout-fees-for-woocommerce/includes/class-alg-wc-checkout-fees.php:555
Stack trace:
#0 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/checkout-fees-for-woocommerce/includes/class-alg-wc-checkout-fees.php(901): Alg_WC_Checkout_Fees->calculate_the_fee()
#1 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/checkout-fees-for-woocommerce/includes/class-alg-wc-checkout-fees.php(954): Alg_WC_Checkout_Fees->get_the_fee()
#2 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/checkout-fees-for-woocommerce/includes/class-alg-wc-checkout-fees.php(416): Alg_WC_Checkout_Fees->maybe_add_cart_fee()
#3 /home/lcdcnet/mantra.lcdc.co/wp-includes/class-wp-hook.php(308): Alg_WC_Checkout_Fees->add_gateways_fees()
#4 /home/lcdcnet/mantra.lcdc.co/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#5 /home/lcdcnet/mantra.lcdc.co/wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1888): do_action()
#7 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(272): WC_Cart->calculate_fees()
#8 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(833): WC_Cart_Totals->get_fees_from_cart()
#9 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(145): WC_Cart_Totals->calculate_fee_totals()
#10 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(134): WC_Cart_Totals->calculate()
#11 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1401): WC_Cart_Totals->__construct()
#12 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(378): WC_Cart->calculate_totals()
#13 /home/lcdcnet/mantra.lcdc.co/wp-includes/class-wp-hook.php(308): WC_AJAX::update_order_review()
#14 /home/lcdcnet/mantra.lcdc.co/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#15 /home/lcdcnet/mantra.lcdc.co/wp-includes/plugin.php(517): WP_Hook->do_action()
#16 /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(96): do_action()
#17 /home/lcdcnet/mantra.lcdc.co/wp-includes/class-wp-hook.php(308): WC_AJAX::do_wc_ajax()
#18 /home/lcdcnet/mantra.lcdc.co/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#19 /home/lcdcnet/mantra.lcdc.co/wp-includes/plugin.php(517): WP_Hook->do_action()
#20 /home/lcdcnet/mantra.lcdc.co/wp-includes/template-loader.php(13): do_action()
#21 /home/lcdcnet/mantra.lcdc.co/wp-blog-header.php(19): require_once('/home/lcdcnet/m...')
#22 /home/lcdcnet/mantra.lcdc.co/index.php(17): require('/home/lcdcnet/m...')
#23 {main}
thrown in /home/lcdcnet/mantra.lcdc.co/wp-content/plugins/checkout-fees-for-woocommerce/includes/class-alg-wc-checkout-fees.php on line 555

To Reproduce
Steps to reproduce the behavior:

  1. On this site you can see the issue if you activate Payment Gateway Based Fees and Discounts for WooCommerce. If activating it doesn't immediately cause the issue, try to set up a global 2.5% fee in the plugin to all carts.

I was unable to replicate the issue but I think we can fix the error message.

Setting video - https://drive.google.com/file/d/11OOSQaL8jRFHN33Z18g_4SqRG2MJmHwm

Additional context
https://tychesoftwares.freshdesk.com/a/tickets/53460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client issue Reported by a client type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants