WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey guys can you please help me with something regarding the woocommerce plugin?

I want only these fields show up in the shipping section (i think it requires a reorder of the fields, but i don't know where to begin)


Address 1

Adress 2

Email | Telephone

Company FIELD 1 | FIELD 2 (for the company details)

share|improve this question

closed as off-topic by kaiser Sep 12 '14 at 10:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Address fields are controlled by the WC_Countries class and can be filtered via:

$address_fields = apply_filters( 'woocommerce_' . $type . 'fields', $address_fields, $country );

where there are 2 $types: billing and shipping. Once you've found that it is just PHP array manipulation:

function reorder_shipping_fields( $address_fields ){

    if ( isset( $address_fields['shipping_company'] ) ){
        $shipping_company = $address_fields['shipping_company'];
        unset( $address_fields['shipping_company'] );
        $address_fields['shipping_company'] = $shipping_company;

    return $address_fields;

add_filter( 'woocommerce_shipping_fields', 'reorder_shipping_fields' );
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.