corsonr
12/16/2013 - 8:36 AM

WooCommerce: re-order shipping fields

WooCommerce: re-order shipping fields

add_filter( 'woocommerce_order_formatted_shipping_address' , 'woo_custom_order_formatted_shipping_address' );

/**
 * woo_custom_order_formatted_shipping_address
 *
 * @access      public
 * @since       1.0 
 * @return      void
*/
function woo_custom_order_formatted_shipping_address() {
	
	$address = array(
		'first_name' 	=> $this->shipping_first_name,
		'last_name'		=> $this->shipping_last_name,
		'company'		=> $this->shipping_company,
		'address_1'		=> $this->shipping_address_1,
		'address_2'		=> $this->shipping_address_2,
		'city'			=> $this->shipping_city,
		'state'			=> $this->shipping_state,
		'postcode'		=> $this->shipping_postcode,
		'country'		=> $this->shipping_country
	);

	return $address;
	
}