WooCommerce Checkout Validation and Custom Field Sanitization
WooCommerce checkout validation and custom field sanitization A custom checkout field needs three things: it is displayed, its value is validated before the order is created, and it is sanitized when it is saved. Each step has its own hook, and using the wrong one leads to orders placed with invalid data or errors shown…