woothemes/woocommerce — pull request #6741 by ragulka (2014-11-13 11:34:17+00:00)
Title: Custom attributes for select, checkbox and textareas

This adds custom attributes support for selects, textareas and checboxes when using the WC Meta Box Functions - `woocommerce_wp_textarea_input`, `woocommerce_wp_select` and `woocommerce_wp_checkbox`.

Unfortunately there's a lot of code duplication in these functions, which should be addressed later though. But perhaps this is a good place to start a conversation on the topic. Why do we even have these functions when we have `woocommerce_form_field`? I understand that the HTML outputs for those functions are different, but that could be controlled via an option in woocommerce_form_field, no?

Besides this, there are a lot of places that create the form fields manually, further creating confusion. For example https://github.com/woothemes/woocommerce/blob/master/includes/admin/class-wc-admin-settings.php#L205-L593. Would it not make sense to consolidate all those different methods into using `woocommerce_form_field`, or similar?