From bf06b7d19fcff07c44ffc7314fb27081a04ed8ee Mon Sep 17 00:00:00 2001 From: David Stone Date: Wed, 25 Mar 2026 21:35:05 -0600 Subject: [PATCH 1/3] chore: mark t451 complete (PR #476 merged) --- TODO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 58d103c93..98218b17e 100644 --- a/TODO.md +++ b/TODO.md @@ -4,4 +4,4 @@ - [x] t374 Add support for creating new domains in Cloudflare @superdav42 #374 ~4h started:2026-03-24T00:00:00Z pr:#377 completed:2026-03-25 - [x] t450 Positioning and growth plan to attract more customers ref:GH#450 ~8h pr:#452 completed:2026-03-25 -- [ ] t451 Fix WP Performance Metrics CI ECONNREFUSED failure (WordPress server not starting on port 9400) ref:GH#475 ~2h #bug #auto-dispatch \ No newline at end of file +- [x] t451 Fix WP Performance Metrics CI ECONNREFUSED failure (WordPress server not starting on port 9400) ref:GH#475 ~2h #bug #auto-dispatch pr:#476 completed:2026-03-25 \ No newline at end of file From a484cb72e065a63900534d3bd90556db6c29be49 Mon Sep 17 00:00:00 2001 From: David Stone Date: Wed, 25 Mar 2026 21:35:45 -0600 Subject: [PATCH 2/3] chore: add t452 universal tax fallback redesign (GH#505) --- TODO.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 98218b17e..9ff35ec11 100644 --- a/TODO.md +++ b/TODO.md @@ -4,4 +4,5 @@ - [x] t374 Add support for creating new domains in Cloudflare @superdav42 #374 ~4h started:2026-03-24T00:00:00Z pr:#377 completed:2026-03-25 - [x] t450 Positioning and growth plan to attract more customers ref:GH#450 ~8h pr:#452 completed:2026-03-25 -- [x] t451 Fix WP Performance Metrics CI ECONNREFUSED failure (WordPress server not starting on port 9400) ref:GH#475 ~2h #bug #auto-dispatch pr:#476 completed:2026-03-25 \ No newline at end of file +- [x] t451 Fix WP Performance Metrics CI ECONNREFUSED failure (WordPress server not starting on port 9400) ref:GH#475 ~2h #bug #auto-dispatch pr:#476 completed:2026-03-25 +- [ ] t452 feat(tax): implement universal tax fallback as "Apply to all countries" dropdown option on Tax Rates page ref:GH#505 ~3h #enhancement #auto-dispatch \ No newline at end of file From b63084fd8be1e9ba6ddd25cfbaecd9c58e396d85 Mon Sep 17 00:00:00 2001 From: David Stone Date: Wed, 25 Mar 2026 21:40:38 -0600 Subject: [PATCH 3/3] docs(tax): document wildcard '*' country fallback behaviour in wu_get_applicable_tax_rates The 'Apply to all countries' option (country='*') was already implemented in the dropdown (views/taxes/list.php) and the fallback logic (wu_get_applicable_tax_rates), but the function docblock did not describe this behaviour. Add explicit documentation so contributors understand: - '*' rates act as a universal fallback - Country-specific rates always take precedence - '*' rates are only returned when no country-specific rate matches Closes #505 --- inc/functions/tax.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/functions/tax.php b/inc/functions/tax.php index 4a56811e5..4bfaeef48 100644 --- a/inc/functions/tax.php +++ b/inc/functions/tax.php @@ -116,12 +116,17 @@ function wu_get_tax_amount($base_price, $amount, $type, $format = true, $inclusi /** * Searches for applicable tax rates based on the country. * + * Rates with country set to '*' (Apply to all countries) act as a universal + * fallback: they are returned only when no country-specific rate matches the + * customer's country. Country-specific rates always take precedence over the + * wildcard fallback. + * * @todo This can be greatly improved and should support multiple rates * in the future. * * @since 2.0.0 * - * @param string $country The country to search for. + * @param string $country The country to search for. Pass '*' to match only wildcard rates. * @param string $tax_category The tax category of the product. * @param string $state The state to filter by. * @param string $city The city to filter by.