Created
December 16, 2013 08:30
-
-
Save corsonr/7983890 to your computer and use it in GitHub Desktop.
WooCommerce: re-order shipping fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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