gabriele
11/10/2018 - 6:04 PM

Remove all placeholder from woocommerce checkout

// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );

// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
         // loop by category
    foreach ($fields as $category => $value) {
        // loop by fields
        foreach ($fields[$category] as $field => $property) {
            // remove placeholder property
            unset($fields[$category][$field]['placeholder']);
        }
    }
     
     
     return $fields;
}