Title: How include class in optios
Last modified: May 6, 2020

---

# How include class in optios

 *  Resolved [jomonter](https://wordpress.org/support/users/jomonter/)
 * (@jomonter)
 * [6 years ago](https://wordpress.org/support/topic/how-include-class-in-optios/)
 * Hello I need help in include class personalize in options mi actuality code is
   this
 * add_filter( ‘woocommerce_checkout_fields’ , ‘extra_field’ );
    function extra_field(
   $fields ) {
 *  $documentos = array(
    ” => ‘Seleccione Tipo de Documento’,
 *  );
 *  $fields[‘billing’][‘tipo_documento’] = array(
    ‘input_class’ => array( ‘estilo
   select-display’), ‘label’ => __(‘Tipo de documento’, ‘woocommerce’), ‘required’
   => true, ‘class’ => array(‘woocommerce-form-row woocommerce-form-row–wide form-
   row form-row-wide’) );
 *  $fields[‘billing’][‘tipo_documento’][‘type’] = ‘select’;
    $fields[‘billing’][‘
   tipo_documento’][‘options’] = $documentos;
 *  $fields[‘billing’][‘documento’] = array(
    ‘input_class’ => array( ‘estilo select-
   display’), ‘label’ => __(‘Documento’, ‘woocommerce’), ‘required’ => true, ‘class’
   => array(‘form-row-first’), ‘options’ => array( ‘hola’ ) );
 *  $documento = array(
    ‘0’ => __(‘Seleccione Documento’, ‘woocommerce’), ‘J’ =
   > __(‘J’, ‘abe-documento’), ‘V’ => __(‘V’, ‘abe-documento’), ‘E’ => __(‘E’, ‘
   abe-documento’), ‘P’ => __(‘P’, ‘abe-documento’), );
 *  $fields[‘billing’][‘documento’][‘type’] = ‘select’;
    $fields[‘billing’][‘documento’][‘
   options’] = $documento; $fields[‘billing’][‘documento’][‘options’][‘class’] =‘
   abe-documento’;
 *  $fields[‘billing’][‘documento_id’] = array(
    ‘required’ => true, ‘label’ => 
   __(‘ ‘, ‘woocommerce’), ‘placeholder’ => ‘33355777’, ‘class’ => array(‘form-row-
   last’) ); return $fields; }

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Joey – a11n](https://wordpress.org/support/users/jricketts4/)
 * (@jricketts4)
 * [6 years ago](https://wordpress.org/support/topic/how-include-class-in-optios/#post-12793144)
 * [@jomonter](https://wordpress.org/support/users/jomonter/) – this is a complex
   issue, for which I suggest you reach out to a private developer: [https://woocommerce.com/customizations/](https://woocommerce.com/customizations/)
   
   With that being said, we’ll leave this open for a bit to see if anyone else chimes
   in.
 * – Joey
 *  Plugin Support [Thu P. a11n](https://wordpress.org/support/users/thup90/)
 * (@thup90)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/how-include-class-in-optios/#post-12824951)
 * Hi there,
 * I hope you found the previous reply helpful. We haven’t heard back from you in
   a while, so I’m going to mark this as resolved – if you have any further questions,
   you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How include class in optios’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Thu P. a11n](https://wordpress.org/support/users/thup90/)
 * Last activity: [5 years, 12 months ago](https://wordpress.org/support/topic/how-include-class-in-optios/#post-12824951)
 * Status: resolved