woocommerce_apply_base_tax_for_local_pickup filter-hookWC 6.8.0

Filters whether apply base tax for local pickup shipping method or not.

Usage

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.
Default: true

Changelog

Since 6.8.0 Introduced.

Where the hook is called

WC_Abstract_Order::get_tax_location()
woocommerce_apply_base_tax_for_local_pickup
ShippingController::filter_taxable_address()
woocommerce_apply_base_tax_for_local_pickup
WC_Customer::get_taxable_address()
woocommerce_apply_base_tax_for_local_pickup
woocommerce/includes/abstracts/abstract-wc-order.php 1680
$apply_base_tax = true === apply_filters( 'woocommerce_apply_base_tax_for_local_pickup', true );
woocommerce/src/Blocks/Shipping/ShippingController.php 413
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 ) {

Where the hook is used in WooCommerce

Usage not found.