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

Fatal Error on the checkout page. #119

Closed
apeksha10 opened this issue Jan 17, 2023 · 0 comments
Closed

Fatal Error on the checkout page. #119

apeksha10 opened this issue Jan 17, 2023 · 0 comments
Assignees
Milestone

Comments

@apeksha10
Copy link
Contributor

Describe the bug
Fatal Error on the checkout page.

To Reproduce
Steps to reproduce the behavior:

  1. PHP 8.0 setup
  2. Try to place an order
  3. On the checkout page, I got this error.

[17-Jan-2023 07:37:18 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string - string in C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\checkout-fees-for-woocommerce\includes\class-alg-wc-checkout-fees.php:533
Stack trace:
#0 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\checkout-fees-for-woocommerce\includes\class-alg-wc-checkout-fees.php(885): Alg_WC_Checkout_Fees->calculate_the_fee(Array, 0, 1101.8, 'fee_1')
#1 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\checkout-fees-for-woocommerce\includes\class-alg-wc-checkout-fees.php(948): Alg_WC_Checkout_Fees->get_the_fee(Array, 'fee_both')
#2 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\checkout-fees-for-woocommerce\includes\class-alg-wc-checkout-fees.php(416): Alg_WC_Checkout_Fees->maybe_add_cart_fee(Array)
#3 C:\Users\User\Local Sites\hpos\app\public\wp-includes\class-wp-hook.php(308): Alg_WC_Checkout_Fees->add_gateways_fees(Object(WC_Cart))
#4 C:\Users\User\Local Sites\hpos\app\public\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#5 C:\Users\User\Local Sites\hpos\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#6 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-cart.php(1888): do_action('woocommerce_car...', Object(WC_Cart))
#7 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-cart-totals.php(272): WC_Cart->calculate_fees()
#8 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-cart-totals.php(833): WC_Cart_Totals->get_fees_from_cart()
#9 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-cart-totals.php(145): WC_Cart_Totals->calculate_fee_totals()
#10 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-cart-totals.php(134): WC_Cart_Totals->calculate()
#11 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-cart.php(1401): WC_Cart_Totals->_construct(Object(WC_Cart))
#12 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-ajax.php(374): WC_Cart->calculate_totals()
#13 C:\Users\User\Local Sites\hpos\app\public\wp-includes\class-wp-hook.php(308): WC_AJAX::update_order_review('')
#14 C:\Users\User\Local Sites\hpos\app\public\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#15 C:\Users\User\Local Sites\hpos\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#16 C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\woocommerce\includes\class-wc-ajax.php(94): do_action('wc_ajax_update
...')
#17 C:\Users\User\Local Sites\hpos\app\public\wp-includes\class-wp-hook.php(308): WC_AJAX::do_wc_ajax('')
#18 C:\Users\User\Local Sites\hpos\app\public\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(false, Array)
#19 C:\Users\User\Local Sites\hpos\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#20 C:\Users\User\Local Sites\hpos\app\public\wp-includes\template-loader.php(13): do_action('template_redire...')
#21 C:\Users\User\Local Sites\hpos\app\public\wp-blog-header.php(19): require_once('C:\Users\User\L...')
#22 C:\Users\User\Local Sites\hpos\app\public\index.php(17): require('C:\Users\User\L...')
#23 {main}
thrown in C:\Users\User\Local Sites\hpos\app\public\wp-content\plugins\checkout-fees-for-woocommerce\includes\class-alg-wc-checkout-fees.php on line 533

https://www.screencast.com/t/v1TNg3HYuT

Setting screenshots: https://www.screencast.com/t/EfyPnJBl
https://www.screencast.com/t/pfL7Pw9JdF
https://www.screencast.com/t/VZZnG18cve
https://www.screencast.com/t/ad0oZRctJz

Expected behavior
No error must be thrown from our plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants