Is this added field stored in database?
-
I added this to my functions.php to add a dropdown on the woocommerce checkout page. I want to know if the data gathered from this will be stored in the database. if it is, how do i extract it after the checkout is complete?
// 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 ) {
$fields[‘billing’][‘billing_options’] = array(
‘label’ => __(‘Options’, ‘woocommerce’),
‘placeholder’ => _x(”, ‘placeholder’, ‘woocommerce’),
‘required’ => false,
‘clear’ => false,
‘type’ => ‘select’,
‘class’ => array(‘own-css-name’),
‘options’ => array(
‘option_a’ => __(‘option a’, ‘woocommerce’ ),
‘option_b’ => __(‘option b’, ‘woocommerce’ )
)
);}
- The topic ‘Is this added field stored in database?’ is closed to new replies.