Limit woocommerce order note length

A very important snippet that you can use to limit woocommerce order note length

add_filter( 'woocommerce_checkout_fields', 'limit_order_note_length' );
function limit_order_note_length( $fields ) {
 $fields['order']['order_comments']['maxlength'] = 200;
 return $fields;
}

See also  Adding Custom Fields To Emails

Leave a Reply

Your email address will not be published. Required fields are marked *