Skip to content

[2.x] Fix 400 error when cart has no line items#36

Closed
sjcallender wants to merge 1 commit into
craftcms:2.xfrom
FosterCommerce:fix/empty-cart-400-error-v2
Closed

[2.x] Fix 400 error when cart has no line items#36
sjcallender wants to merge 1 commit into
craftcms:2.xfrom
FosterCommerce:fix/empty-cart-400-error-v2

Conversation

@sjcallender
Copy link
Copy Markdown
Contributor

Description

The adjuster calls the TaxJar API on every order recalculation regardless of whether the cart has any line items. When the cart is empty, TaxJar returns a 400 Bad Request – No amount or line items provided error on every recalculation event. Added an early return in adjust() alongside the existing address guard.

Related issues

Fixes #34 for Craft Commerce 4.x

@lukeholder
Copy link
Copy Markdown
Member

2.1.1 is out with this fix.

@lukeholder lukeholder closed this May 7, 2026
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

Successfully merging this pull request may close these issues.

2 participants