woocommerce_customer_taxable_address
Filters the taxable address for a given customer.
Использование
add_filter( 'woocommerce_customer_taxable_address', 'wp_kama_woocommerce_customer_taxable_address_filter', 10, 2 ); /** * Function for `woocommerce_customer_taxable_address` filter-hook. * * @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 */ function wp_kama_woocommerce_customer_taxable_address_filter( $taxable_address, $customer ){ // filter... return $taxable_address; }
- $taxable_address(массив)
- An array of country, state, postcode, and city for the customer's taxable address.
- $customer(объект)
- The customer object for which the taxable address is being requested.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
woocommerce_customer_taxable_address
woocommerce/includes/class-wc-customer.php 220
return apply_filters( 'woocommerce_customer_taxable_address', array( $country, $state, $postcode, $city ), $this );
Где используется хук в WooCommerce
woocommerce/src/Blocks/Shipping/ShippingController.php 72
add_filter( 'woocommerce_customer_taxable_address', array( $this, 'filter_taxable_address' ) );