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

Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, bool given in class-wc-connect-taxjar-integration.php #2798

Open
asheroto opened this issue Aug 17, 2024 · 3 comments

Comments

@asheroto
Copy link

asheroto commented Aug 17, 2024

Hello!

While doing a test transaction on our store, while logged in, I received an Internal Server Error on checkout.

The weird thing is, if I open an incognito/private window (different session) and run through a checkout, I can successfully place an order. But when I'm doing it while logged in, it doesn't work.

It appears to be an issue with TaxJar.

WordPress: 8.9.3
WooCommerce: 6.9.1
PHP: 8.2.22

Log

2024-08-17T21:41:52+00:00 CRITICAL Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, bool given in /home/*****/web/*****.com/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-taxjar-integration.php:864 CONTEXT: {"error":{"type":1,"file":"\/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php","line":864},"backtrace":["","#0 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(864): array_values()","#1 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(326): WC_Connect_TaxJar_Integration->override_woocommerce_tax_rates()","#2 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()","#3 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-tax.php(74): apply_filters()","#4 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(737): WC_Tax::calc_tax()","#5 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(659): WC_Cart_Totals->calculate_item_subtotals()","#6 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(150): WC_Cart_Totals->calculate_item_totals()","#7 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(141): WC_Cart_Totals->calculate()","#8 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(550): WC_Cart_Totals->__construct()","#9 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(451): WC_Connect_TaxJar_Integration->calculate_totals()","#10 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_Connect_TaxJar_Integration->maybe_calculate_totals()","#11 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#12 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#13 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart.php(1410): do_action()","#14 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-ajax.php(413): WC_Cart->calculate_totals()","#15 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_AJAX::update_order_review()","#16 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#17 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#18 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-ajax.php(96): do_action()","#19 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_AJAX::do_wc_ajax()","#20 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#21 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#22 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/template-loader.php(13): do_action()","#23 \/home\/*****\/web\/*****.com\/public_html\/wp-blog-header.php(19): require_once('\/home\/****...')","#24 \/home\/*****\/web\/*****.com\/public_html\/index.php(17): require('\/home\/****...')","#25 {main}","thrown"]}
2024-08-17T21:41:58+00:00 CRITICAL Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, bool given in /home/*****/web/*****.com/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-taxjar-integration.php:864 CONTEXT: {"error":{"type":1,"file":"\/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php","line":864},"backtrace":["","#0 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(864): array_values()","#1 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(326): WC_Connect_TaxJar_Integration->override_woocommerce_tax_rates()","#2 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()","#3 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-tax.php(74): apply_filters()","#4 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(737): WC_Tax::calc_tax()","#5 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(659): WC_Cart_Totals->calculate_item_subtotals()","#6 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(150): WC_Cart_Totals->calculate_item_totals()","#7 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(141): WC_Cart_Totals->calculate()","#8 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(550): WC_Cart_Totals->__construct()","#9 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(451): WC_Connect_TaxJar_Integration->calculate_totals()","#10 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_Connect_TaxJar_Integration->maybe_calculate_totals()","#11 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#12 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#13 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart.php(1410): do_action()","#14 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-ajax.php(413): WC_Cart->calculate_totals()","#15 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_AJAX::update_order_review()","#16 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#17 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#18 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-ajax.php(96): do_action()","#19 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_AJAX::do_wc_ajax()","#20 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#21 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#22 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/template-loader.php(13): do_action()","#23 \/home\/*****\/web\/*****.com\/public_html\/wp-blog-header.php(19): require_once('\/home\/****...')","#24 \/home\/*****\/web\/*****.com\/public_html\/index.php(17): require('\/home\/****...')","#25 {main}","thrown"]}
2024-08-17T21:42:16+00:00 CRITICAL Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, bool given in /home/*****/web/*****.com/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-taxjar-integration.php:864 CONTEXT: {"error":{"type":1,"file":"\/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php","line":864},"backtrace":["","#0 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(864): array_values()","#1 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(326): WC_Connect_TaxJar_Integration->override_woocommerce_tax_rates()","#2 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()","#3 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-tax.php(74): apply_filters()","#4 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(737): WC_Tax::calc_tax()","#5 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(659): WC_Cart_Totals->calculate_item_subtotals()","#6 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(150): WC_Cart_Totals->calculate_item_totals()","#7 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(141): WC_Cart_Totals->calculate()","#8 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(550): WC_Cart_Totals->__construct()","#9 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(451): WC_Connect_TaxJar_Integration->calculate_totals()","#10 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_Connect_TaxJar_Integration->maybe_calculate_totals()","#11 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()","#12 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()","#13 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart.php(1410): do_action()","#14 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/shortcodes\/class-wc-shortcode-checkout.php(354): WC_Cart->calculate_totals()","#15 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/shortcodes\/class-wc-shortcode-checkout.php(69): WC_Shortcode_Checkout::checkout()","#16 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-shortcodes.php(72): WC_Shortcode_Checkout::output()","#17 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-shortcodes.php(95): WC_Shortcodes::shortcode_wrapper()","#18 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/shortcodes.php(434): WC_Shortcodes::checkout()","#19 [internal function]: do_shortcode_tag()","#20 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/shortcodes.php(273): preg_replace_callback()","#21 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): do_shortcode()","#22 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()","#23 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/post-template.php(256): apply_filters()","#24 \/home\/

Additional context

2024-08-17T21:48:37+00:00 Critical Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, bool given in /home/*****/web/*****.com/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-taxjar-integration.php:864  
Additional context
{
    "error": {
        "type": 1,
        "file": "\/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php",
        "line": 864
    },
    "backtrace": [
        "",
        "#0 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(864): array_values()",
        "#1 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(326): WC_Connect_TaxJar_Integration->override_woocommerce_tax_rates()",
        "#2 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()",
        "#3 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-tax.php(74): apply_filters()",
        "#4 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(737): WC_Tax::calc_tax()",
        "#5 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(659): WC_Cart_Totals->calculate_item_subtotals()",
        "#6 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(150): WC_Cart_Totals->calculate_item_totals()",
        "#7 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart-totals.php(141): WC_Cart_Totals->calculate()",
        "#8 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(550): WC_Cart_Totals->__construct()",
        "#9 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce-services\/classes\/class-wc-connect-taxjar-integration.php(451): WC_Connect_TaxJar_Integration->calculate_totals()",
        "#10 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): WC_Connect_TaxJar_Integration->maybe_calculate_totals()",
        "#11 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()",
        "#12 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()",
        "#13 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-cart.php(1410): do_action()",
        "#14 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/shortcodes\/class-wc-shortcode-checkout.php(354): WC_Cart->calculate_totals()",
        "#15 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/shortcodes\/class-wc-shortcode-checkout.php(69): WC_Shortcode_Checkout::checkout()",
        "#16 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-shortcodes.php(72): WC_Shortcode_Checkout::output()",
        "#17 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-wc-shortcodes.php(95): WC_Shortcodes::shortcode_wrapper()",
        "#18 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/shortcodes.php(434): WC_Shortcodes::checkout()",
        "#19 [internal function]: do_shortcode_tag()",
        "#20 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/shortcodes.php(273): preg_replace_callback()",
        "#21 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): do_shortcode()",
        "#22 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(205): WP_Hook->apply_filters()",
        "#23 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/post-template.php(256): apply_filters()",
        "#24 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/themes\/storefront\/inc\/storefront-template-functions.php(352): the_content()",
        "#25 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(324): storefront_page_content()",
        "#26 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()",
        "#27 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action()",
        "#28 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/themes\/storefront\/content-page.php(18): do_action()",
        "#29 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/template.php(812): require('\/home\/***** */...')",
        "#30 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/template.php(745): load_template()",
        "#31 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/general-template.php(206): locate_template()",
        "#32 \/home\/*****\/web\/*****.com\/public_html\/wp-content\/themes\/storefront\/page.php(24): get_template_part()",
        "#33 \/home\/*****\/web\/*****.com\/public_html\/wp-includes\/template-loader.php(106): include('\/home\/***** */...')",
        "#34 \/home\/*****\/web\/*****.com\/public_html\/wp-blog-header.php(19): require_once('\/home\/***** */...')",
        "#35 \/home\/*****\/web\/*****.com\/public_html\/index.php(17): require('\/home\/***** */...')",
        "#36 {main}",
        "thrown"
    ]
}

When I go to /cart, I see this:

image

Going to /checkout just gives me the internal server error message.

I cleared my cookies for my site and tried to purchase again. Same thing happened.

I don't think it likes the saved zip code value, and it's erroring out because of that:
Postcode / ZIP does not match the selected state.

Tasks

No tasks being tracked yet.
@asheroto
Copy link
Author

Actually now I get this error on every site page I visit while logged in. I even cleared my session/index/cookie data.

image

@asheroto
Copy link
Author

asheroto commented Aug 17, 2024

I went into the Users area and edited my user. While testing, I had put in a Brazilian postal code of 57160-000, set the country to Brazil, but it had still had the state shown, and that field was set on Alabama. So the glitch is somewhere related to this. Once I changed it in the user settings it started working again.

Even so, this glitch shouldn't occur. Maybe somebody here can replicate the problem or discover the issue through the logs?

@asheroto
Copy link
Author

Still getting this

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

No branches or pull requests

1 participant