woocommerce_apply_base_tax_for_local_pickup
Filters whether apply base tax for local pickup shipping method or not.
Использование
add_filter( 'woocommerce_apply_base_tax_for_local_pickup', 'wp_kama_woocommerce_apply_base_tax_for_local_pickup_filter' ); /** * Function for `woocommerce_apply_base_tax_for_local_pickup` filter-hook. * * @param boolean $true apply_base_tax Whether apply base tax for local pickup. * * @return boolean */ function wp_kama_woocommerce_apply_base_tax_for_local_pickup_filter( $true ){ // filter... return $true; }
- $true(true|false)
- apply_base_tax Whether apply base tax for local pickup.
По умолчанию: true
Список изменений
С версии 6.8.0 | Введена. |
Где вызывается хук
woocommerce_apply_base_tax_for_local_pickup
woocommerce_apply_base_tax_for_local_pickup
woocommerce_apply_base_tax_for_local_pickup
woocommerce/includes/abstracts/abstract-wc-order.php 1705
$apply_base_tax = true === apply_filters( 'woocommerce_apply_base_tax_for_local_pickup', true );
woocommerce/src/Blocks/Shipping/ShippingController.php 378
if ( $chosen_method_id && true === apply_filters( 'woocommerce_apply_base_tax_for_local_pickup', true ) && in_array( $chosen_method_id, LocalPickupUtils::get_local_pickup_method_ids(), true ) ) {
woocommerce/includes/class-wc-customer.php 189
if ( true === apply_filters( 'woocommerce_apply_base_tax_for_local_pickup', true ) && count( array_intersect( wc_get_chosen_shipping_method_ids(), apply_filters( 'woocommerce_local_pickup_methods', array( 'legacy_local_pickup', 'local_pickup' ) ) ) ) > 0 ) {