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 during TaxJar configuration (Step 1) #256

Open
DevMwd opened this issue Jul 9, 2024 · 2 comments
Open

Fatal error during TaxJar configuration (Step 1) #256

DevMwd opened this issue Jul 9, 2024 · 2 comments

Comments

@DevMwd
Copy link

DevMwd commented Jul 9, 2024

During step 1, returning from logging in and connecting on "app.taxjar.com", the plugin causes a fatal error due to passing a string to the PHP count() function.

Here is the stack trace:

PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /.../wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-wc-taxjar-nexus.php:24
Stack trace:
#0 /.../wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-taxjar-settings.php(330): WC_Taxjar_Nexus->get_form_settings_field()
#1 /.../wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-taxjar-settings.php(208): TaxJar_Settings::get_nexus_settings_display()
#2 /.../wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-taxjar-settings.php(645): TaxJar_Settings::get_settings()
#3 /.../wp-includes/class-wp-hook.php(324): TaxJar_Settings::save()
#4 /.../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /.../wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /.../wp-content/plugins/woocommerce/includes/admin/class-wc-admin-settings.php(80): do_action()
#7 /.../wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php(181): WC_Admin_Settings::save()
#8 /.../wp-includes/class-wp-hook.php(324): WC_Admin_Menus->save_settings()
#9 /.../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#10 /.../wp-includes/plugin.php(517): WP_Hook->do_action()
#11 /.../wp-settings.php(717): do_action()
#12 /.../wp-config.php(106): require_once('...')
#13 /.../wp-load.php(50): require_once('...')
#14 /.../wp-admin/admin.php(34): require_once('...')

The PHP version on the server is 8.1.29 and the website is being served with FPM on an Apache server.

@ahumulescu
Copy link
Collaborator

Hi @DevMwd,

Thank you for raising this issue!

Coincidentally, I have the same setup for my local environment, but I have not managed to replicate your issue.

What versions of WooCommerce/WordPress are you using?

Also, would it be possible to check the actual string value that is passed to the count method, please? Is it just an empty string?

@jccarlin
Copy link

We came across the same error and figured out it resulted from our client's TaxJar account becoming inactive due to an old credit card tied to their payment. Once our client renewed their service, we continued to receive the error and the TaxJar settings page was also throwing an error that wouldn't allow us to reconnect the service.

We had tried deactivating and reactivating the plugin, but this didn't do the trick. Next we removed the stored hashed token from the DB, and this allowed us to reconnect the account through the TaxJar settings page in WP/WooCommerce.

Plugin and service has continued working as expected since then.

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

3 participants