woocommerce_shipping_(id)_is_available
See if the method is available.
Использование
add_filter( 'woocommerce_shipping_(id)_is_available', 'wp_kama_woocommerce_shipping_id_is_available_filter', 10, 2 ); /** * Function for `woocommerce_shipping_(id)_is_available` filter-hook. * * @param $package * @param $that * * @return */ function wp_kama_woocommerce_shipping_id_is_available_filter( $package, $that ){ // filter... return $package; }
- $package
- -
- $that
- -
Где вызывается хук
woocommerce_shipping_(id)_is_available
woocommerce_shipping_(id)_is_available
woocommerce_shipping_(id)_is_available
woocommerce_shipping_(id)_is_available
woocommerce_shipping_(id)_is_available
woocommerce_shipping_(id)_is_available
woocommerce/src/Blocks/Shipping/PickupLocation.php 127
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', 'yes' === $this->enabled, $package, $this );
woocommerce/includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php 234
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this );
woocommerce/includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php 226
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this );
woocommerce/includes/shipping/free-shipping/class-wc-shipping-free-shipping.php 223
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this );
woocommerce/includes/shipping/legacy-international-delivery/class-wc-shipping-legacy-international-delivery.php 83
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', true, $package, $this );
woocommerce/includes/abstracts/abstract-wc-shipping-method.php 422
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $available, $package, $this );