Use order raw address instead of formatted for filter
This commit is contained in:
parent
de1dfbb1b4
commit
dbc9719d76
|
@ -882,14 +882,12 @@ class WC_Order extends WC_Abstract_Order {
|
|||
* @return string
|
||||
*/
|
||||
public function get_formatted_shipping_address( $empty_content = '' ) {
|
||||
$address = '';
|
||||
$address = apply_filters( 'woocommerce_order_formatted_shipping_address', $this->get_address( 'shipping' ), $this );
|
||||
|
||||
if ( $this->has_shipping_address() ) {
|
||||
$address = WC()->countries->get_formatted_address( $this->get_address( 'shipping' ) );
|
||||
$address = WC()->countries->get_formatted_address( $address );
|
||||
}
|
||||
|
||||
$address = apply_filters( 'woocommerce_order_formatted_shipping_address', $address, $this );
|
||||
|
||||
return $address ? $address : $empty_content;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue