• Resolved halehaleomiyage

    (@halehaleomiyage)


    I could customized shipping address in “checkout field” following this tutorial.

    https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/

    I removed some field and added new fields in checkout field.

    Now I want to customize shipping address in “Account page”.
    If you go to Account page=>Addresses, you can edit billing address and shipping address. I want to make these same as checkout field.

    I looked through website and found following snippet. I could unset and customize the field already exists, but I couldn’t find out how to add new fields.
    Do anybody know how to do it?

    add_filter( ‘woocommerce_billing_fields’, ‘custom_woocommerce_billing_fields’ );

    function custom_woocommerce_billing_fields( $fields ) {

    $fields[‘billing_first_name’] = array(
    ‘label’ => __(‘Name’, ‘woothemes’),
    ‘placeholder’ => __(‘Name’, ‘woothemes’),
    ‘required’ => true,
    ‘class’ => array(‘billing-first-name’)
    );

    $fields[‘billing_phone’] = array(
    ‘label’ => __(‘Phone’, ‘woothemes’),
    ‘placeholder’ => __(‘Phone’, ‘woothemes’),
    ‘required’ => false,
    ‘class’ => array(‘billing-phone’)
    );

    return $fields;
    }

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to customize "edit shipping address" in account page?’ is closed to new replies.