Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created December 16, 2013 08:30
Show Gist options
  • Save corsonr/7983890 to your computer and use it in GitHub Desktop.
Save corsonr/7983890 to your computer and use it in GitHub Desktop.
WooCommerce: re-order shipping fields
add_filter( 'woocommerce_order_formatted_billing_address' , 'woo_custom_order_formatted_billing_address' );
/**
* woo_custom_order_formatted_billing_address
*
* @access public
* @since 1.0
* @return void
*/
function woo_custom_order_formatted_billing_address() {
$address = array(
'first_name' => $this->billing_first_name,
'last_name' => $this->billing_last_name,
'company' => $this->billing_company,
'address_1' => $this->billing_address_1,
'address_2' => $this->billing_address_2,
'city' => $this->billing_city,
'state' => $this->billing_state,
'postcode' => $this->billing_postcode,
'country' => $this->billing_country
);
return $address;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment