taxjar / taxjar-woocommerce-plugin

WooCommerce Sales Tax Plugin by TaxJar
http://www.taxjar.com/woocommerce-sales-tax-plugin/
GNU General Public License v2.0
30 stars 29 forks source link

Recalculation Button causes Fatal Error #192

Closed danieldcarimus closed 3 years ago

danieldcarimus commented 3 years ago

We're working on a custom ecomm site.

PHP Fatal error: Uncaught Error: Call to a member function get_tax_rate() on bool in /Users/danieldayton/Local Sites/pteus-com/app/public/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/TaxCalculation/class-order-tax-applicator.php:151 Stack trace:

0 /Users/danieldayton/Local Sites/pteus-com/app/public/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/TaxCalculation/class-order-tax-applicator.php(111): TaxJar\Order_Tax_Applicator->get_product_line_item_tax_rate(458, Object(WC_Order_Item_Product))

1 /Users/danieldayton/Local Sites/pteus-com/app/public/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/TaxCalculation/class-order-tax-applicator.php(93): TaxJar\Order_Tax_Applicator->create_product_tax_rate(458, Object(WC_Order_Item_Product))

2 /Users/danieldayton/Local Sites/pteus-com/app/public/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/TaxCalculation/class-order-tax-applicator.php(82): TaxJar\Order_Tax_Applicator->create_rate_and_apply_to_product in /Users/danieldayton/Local Sites/pteus-com/app/public/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/TaxCalculation/class-order-tax-applicator.php on line 151

We're getting this error whenever the recalculation button is clicked on the order admin screen.

We've dug into the plugin some. It seems the $line_items array is empty. We've tried deactivating all other plugins except payment gateway (Elavon), WooCommerce and Taxjar and we're still getting the same error.

Any recommendations on causes/debugging?

WC - 5.5.1 Taxjar - 3.2.10 WP - 5.7.2

dallendalton commented 3 years ago

@danieldcarimus Thanks for submitting this issue. We are currently investigating it (along with https://github.com/taxjar/taxjar-woocommerce-plugin/issues/193) and will post an update here as soon as we have more information.

Is this error occurring when any subscription renewal is processed on your site or are there renewals that are going through correctly as well?

danieldcarimus commented 3 years ago

@dallendalton we do not have any subscriptions in our shop. I have confirmed the error is taking place when we update the order status to a few of our internal custom statuses.

dallendalton commented 3 years ago

This issue is fixed on https://github.com/taxjar/taxjar-woocommerce-plugin/pull/194 which has now been released.