Skip to content

Instantly share code, notes, and snippets.

@ConradGalli
Forked from corsonr/gist:7983932
Last active August 29, 2015 14:11
Show Gist options
  • Save ConradGalli/eaaacf4e2f1b4c77589b to your computer and use it in GitHub Desktop.
Save ConradGalli/eaaacf4e2f1b4c77589b to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment