PHP Fatal Error when adding to cart in a different language
-
Hello, we are having issues when adding any product to cart when in a different language. This has only been happening recently.
Here’s what the console says: https://ctfo.ca/fr/?wc-ajax=add_to_cart – ERROR 500
Here is the error: it seems to have something to do with WooCommerce’s shipping:[26-Jul-2023 10:58:03 UTC] PHP Fatal error: Uncaught ArgumentCountError: 3 arguments are required, 2 given in /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping.php:165 Stack trace: #0 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping.php(165): sprintf() #1 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping.php(336): WC_Shipping->load_shipping_methods() #2 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping.php(260): WC_Shipping->calculate_shipping_for_package() #3 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1428): WC_Shipping->calculate_shipping() #4 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(346): WC_Cart->calculate_shipping() #5 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(857): WC_Cart_Totals->get_shipping_from_cart() #6 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(151): WC_Cart_Totals->calculate_shipping_totals() #7 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php(141): WC_Cart_Totals->calculate() #8 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1406): WC_Cart_Totals->__construct() #9 /home/ctfoca/public_html/wp-includes/class-wp-hook.php(306): WC_Cart->calculate_totals() #10 /home/ctfoca/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #11 /home/ctfoca/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #12 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1284): do_action() #13 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(464): WC_Cart->add_to_cart() #14 /home/ctfoca/public_html/wp-includes/class-wp-hook.php(308): WC_AJAX::add_to_cart() #15 /home/ctfoca/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #16 /home/ctfoca/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #17 /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(96): do_action() #18 /home/ctfoca/public_html/wp-includes/class-wp-hook.php(308): WC_AJAX::do_wc_ajax() #19 /home/ctfoca/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #20 /home/ctfoca/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #21 /home/ctfoca/public_html/wp-includes/template-loader.php(13): do_action() #22 /home/ctfoca/public_html/wp-blog-header.php(19): require_once(‘/home/ctfoca/pu…’) #23 /home/ctfoca/public_html/index.php(17): require(‘/home/ctfoca/pu…’) #24 {main} thrown in /home/ctfoca/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping.php on line 165
Can you please help us with this?The page I need help with: [log in to see the link]
- The topic ‘PHP Fatal Error when adding to cart in a different language’ is closed to new replies.