Revert "Allow filtering formatted shipping address"

This commit is contained in:
Gerhard Potgieter 2019-07-14 20:25:32 +02:00 committed by GitHub
parent 6693b44a98
commit 8fbe61aa8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -889,9 +889,10 @@ class WC_Order extends WC_Abstract_Order {
* @return string
*/
public function get_formatted_shipping_address( $empty_content = '' ) {
$address = apply_filters( 'woocommerce_order_formatted_shipping_address', $this->get_address( 'shipping' ), $this );
$address = '';
if ( $this->has_shipping_address() ) {
$address = apply_filters( 'woocommerce_order_formatted_shipping_address', $this->get_address( 'shipping' ), $this );
$address = WC()->countries->get_formatted_address( $address );
}