feat: cleanup and improvements for checkout fields

- Removed all debug logging (backend and frontend)
- Added filter hook 'woonoow_standard_checkout_field_keys' for extensibility
- Added form-row-wide class support to admin OrderForm
- Tax is automatically handled by WC's calculate_totals()
This commit is contained in:
Dwindi Ramadhana
2026-01-09 10:06:20 +07:00
parent 942fb48a0b
commit d3ec580ec8
3 changed files with 13 additions and 21 deletions

View File

@@ -1165,7 +1165,9 @@ export default function OrderForm({
.filter((f: any) => f.fieldset === 'shipping' && !f.hidden)
.sort((a: any, b: any) => (a.priority || 0) - (b.priority || 0))
.map((field: any) => {
const isWide = ['address_1', 'address_2'].includes(field.key.replace('shipping_', ''));
// Check for full width: address fields or form-row-wide class from PHP
const hasFormRowWide = Array.isArray(field.class) && field.class.includes('form-row-wide');
const isWide = hasFormRowWide || ['address_1', 'address_2'].includes(field.key.replace('shipping_', ''));
const fieldKey = field.key.replace('shipping_', '');
return (