I add additional fields to the checkout page in WooCommerce, I added the main text fields in order, but I need a drop-down menu or select a field with several parameters, Here is what I have done so far, but somewhere I made a mistake
$fields['billing']['billing_meat'] = array(
'label' => __('Food options', 'woocommerce'),
'placeholder' => _x('', 'placeholder', 'woocommerce'),
'required' => false,
'clear' => false
'type' => 'select',
'options' => array(
__('I eat meat', 'woocommerce') => __('I eat mate', 'woocommerce'),
__('meat is gross', 'woocommerce') => __('meat is gross', 'woocommerce'),
Maybe I'm not correctly defining a type field?
thanks loads
source
share