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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user