woocommerce_cart_ready_to_calc_shipping хук-фильтрWC 2.7.0

Filter to allow plugins to prevent shipping calculations.

Использование

add_filter( 'woocommerce_cart_ready_to_calc_shipping', 'wp_kama_woocommerce_cart_ready_to_calc_shipping_filter' );

/**
 * Function for `woocommerce_cart_ready_to_calc_shipping` filter-hook.
 * 
 * @param bool $ready Whether the cart is ready to calculate shipping.
 *
 * @return bool
 */
function wp_kama_woocommerce_cart_ready_to_calc_shipping_filter( $ready ){

	// filter...
	return $ready;
}
$ready(true|false)
Whether the cart is ready to calculate shipping.

Список изменений

С версии 2.7.0 Введена.

Где вызывается хук

WC_Cart::show_shipping()
woocommerce_cart_ready_to_calc_shipping
woocommerce/includes/class-wc-cart.php 1690
return apply_filters( 'woocommerce_cart_ready_to_calc_shipping', true );

Где используется хук в WooCommerce

Использование не найдено.