Summary:
Freshy resolved a perplexing WooCommerce issue where product quantities were silently adjusted and the selected shipping method reverted to “Local Pickup.” This case study shows how caching layers and session desyncs can cause WooCommerce to behave unexpectedly—especially when third-party services like FedEx Freight are involved.
Issue background
A client encountered two persistent issues in their WooCommerce checkout process:
- Shipping method revert: Even when users selected a flat rate or calculated shipping, the checkout reverted to “Local Pickup” upon order placement, resulting in uncharged shipping fees.
- Cart quantity inconsistencies: A product added at a quantity of 33 was silently reset to 10, and the applied discount triggered incorrect price calculations.
The site was hosted on Pressable and utilized WP Rocket and WooCommerce extensions, including the Eniture FedEx Freight plugin.
Diagnosis
The Freshy team conducted a thorough investigation, creating a staging environment to avoid disrupting live transactions. Key discoveries included:
- FedEx Freight plugin error: The staging site could not load shipping rates due to a failed API call—
Eniture API key is invalid.This likely stemmed from the key being domain-locked to the live site. - Product inventory test: Tests confirmed that WooCommerce correctly restricts users from exceeding available inventory and throws validation errors when limits are breached.
- Cart quantity logic: The team discovered the issue was not reproducible on staging. When inventory is sufficient, WooCommerce should allow higher quantities. Since the client screenshot showed editable quantity input for 33 items, inventory was likely above 10.
Root cause analysis
After confirming WooCommerce logic was functioning normally, Freshy identified a likely culprit:
- Backend session/cache desync: WooCommerce’s frontend displayed updated inventory, but the backend (during
add_to_cart) may have used stale stock data from session storage, transients, or object caching. This would explain why the cart quantity was reset to 10 despite the inventory allowing 33.
For the shipping issue:
- The site appeared to default to Local Pickup because the FedEx Freight plugin failed on staging due to the domain-bound API key.
- On live, Local Pickup was the only available method, conflicting with the client’s report. This suggested caching might have interfered with the real-time shipping calculations or session data had not refreshed.
Resolution steps
- Session storage review: Developers reviewed product metadata and found no code overriding the quantity input.
- Cache exclusion: Suggested excluding WooCommerce critical pages (
/cart/,/checkout/,?wc-ajax=URLs) from all caching layers. - Plugin & theme audit: Ensured no theme or plugin logic was hardcoding quantity or altering cart behavior.
- Client guidance: Shared insights and recommended further probing if issues recur, especially around API credentials and cache timing.
Final outcome
The issue did not reappear after cache clearings and time passage, suggesting a transient backend desync. WooCommerce and plugin configurations were validated, and no lasting problems were found.
Experiencing unpredictable WooCommerce behavior? Contact Freshy — we specialize in advanced WordPress troubleshooting and WooCommerce optimization.