Closed darcie closed 2 years ago
This is due to the array_filter()
call in #2516 returning a sparse array, which is then encoded as an object by wp_json_encode( $body )
. Wrapping the array_filter()
call in array_values()
fixes it, but it feels gross.
Another example in 4863532-zen
Reported in 4876335 - Zen
Related to #2514 likely.
Steps to Reproduce:
Error retrieving the tax rates. Received (406): {"status":"406","error":"Not Acceptable","detail":"line_items is invalid"} (WCS Tax)
I can reproduce this in WooCommerce Shipping & Tax 1.25.23 and 1.25.22, it does not happen in 1.25.21. Due to this, I believe it is related to Pull #2516.
Screenshots:
Logs:
When no rate is returned:
Line items when the rate is successfully returned:
Reported in 4857330-zen and 4803765-zen