WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Edit Custom checkout fields in My account (1 post)

  1. Wao1010
    Member
    Posted 1 year ago #

    I used this http://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ 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 ?

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.