Support » Plugin: WooCommerce » Edit Custom checkout fields in My account

  • I used this tutorial and i made my custom fields but i can not edit them in My Account.

    My code:

    add_action('woocommerce_after_checkout_billing_form', 'my_custom_checkout_field');
    function my_custom_checkout_field( $fields ) {
        echo '<p class="woocommerce_info"><a href="#" id="fir_udaje">Firemné údaje</a>(nepovinné)</p>       <div id="woocommerce-company" style="display: none;">';
        woocommerce_form_field( 'company-name', array(
            'type'          => 'text',
            'class'         => array('form-row-wide'),
            'label'         => __('Firma'),
            'placeholder'       => __('Meno firmy'),
            ), $fields->get_value( 'company-name' ));
    		woocommerce_form_field( 'ICO', array(
            'type'          => 'text',
            'class'         => array('form-row-first'),
            'label'         => __('IČO'),
            ), $fields->get_value( 'ICO' ));
    		woocommerce_form_field( 'DIC', array(
            'type'          => 'text',
            'class'         => array('form-row-last'),
            'label'         => __('IČ DPH'),
    		'clear'     => true
            ), $fields->get_value( 'DIC' ));
        echo '</div>';

    When i use woocommerce_checkout_fields filter it works but i need to have thouse fields in DIV so they can not be added simply into $fields array.
    Any idea ?

  • The topic ‘Edit Custom checkout fields in My account’ is closed to new replies.