Commit c5b6158
committed
Tweak - Narrow the rate-row growth claim to the states that actually duplicated.
The changelog entry named three triggers — a period, a space, and a non-Latin
character. Measured against core, only one of the three is right.
WC_Tax::prepare_tax_rate() stores tax_rate_state as strtoupper( sanitize_key() ),
and WC_Tax::get_matched_tax_rates() matches it with `tax_rate_state IN ( %s, '' )`.
So a row is unfindable — and duplicated on every calculation — only when the
stored value is non-empty *and* differs from what the lookup asked for.
A space never diverged: the old str_replace( ' ', '' ) lookup happened to agree
with sanitize_key() there, and only there. A state that collapses to '' outright
never diverged either, because the blank satisfies the second arm of the IN
clause whatever was asked for. What actually duplicated is a state that collapses
*partially*, to a shorter non-empty code: 'N.Y.' -> 'NY', 'ÎF' -> 'F'.
Rewords the entry to key on the mechanism rather than on scripts, and applies the
same correction to readme.txt, which carries the published verbatim copy. The
state_compact() docblock carried the same overbroad claim and gains the boundary.1 parent 77107d4 commit c5b6158
3 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
| |||
0 commit comments