[ad_1]
Thanks for a great plugin.
1) We have managed to tweak the Shipping Label address format via:
a) Adding this snippet:
add_filter( 'woocommerce_localisation_address_formats', 'filter_localisation_address_formats' );
function filter_localisation_address_formats( $address_formats ){
$address_formats['AU'] = "{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state} {postcode}\n{country}";
return $address_formats;
}b) Also, by adjusting a protected function (not ideal.. but we are trying to find a workaround). But this adds a <br /> to protected code to force a line break.
protected static function merge_city_state_zip($address)
{
//return $address; //disabled
$arr=array();
$arr[]=isset($address['city']) ? $address['city'] : '';
$arr[]=isset($address['state']) ? '<br />'.$address['state'] : '';
$arr[]=isset($address['postcode']) ? $address['postcode'] : '';
unset($address['state']);
unset($address['postcode']);
$address['city']=implode(", ",array_filter(array_values($arr)));
return $address;
}How can we achieve this on the Shipping Label without the code being overwritten next release?
2) How can we force a label size to print? 1 1/4″ x 2 1/4″
