Dev - Add customer object parameter to taxable address filter (#37426)

This commit is contained in:
Ron Rennick 2023-04-10 13:36:06 -03:00 committed by GitHub
commit 054471618e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Dev - Add customer object parameter to taxable address filter

View File

@ -207,7 +207,17 @@ class WC_Customer extends WC_Legacy_Customer {
$city = $this->get_shipping_city();
}
return apply_filters( 'woocommerce_customer_taxable_address', array( $country, $state, $postcode, $city ) );
/**
* Filters the taxable address for a given customer.
*
* @since 3.0.0
*
* @param array $taxable_address An array of country, state, postcode, and city for the customer's taxable address.
* @param object $customer The customer object for which the taxable address is being requested.
*
* @return array The filtered taxable address for the customer.
*/
return apply_filters( 'woocommerce_customer_taxable_address', array( $country, $state, $postcode, $city ), $this );
}
/**