wc_shipping_enabled │ хук-фильтр │ WC 2.6.0

Filters whether shipping is enabled.

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

add_filter( 'wc_shipping_enabled', 'wp_kama_wc_shipping_enabled_filter' );

/**
 * Function for `wc_shipping_enabled` filter-hook.
 * 
 * @param bool $shipping_enabled Whether shipping is enabled.
 *
 * @return bool
 */
function wp_kama_wc_shipping_enabled_filter( $shipping_enabled ){
	// filter...
	return $shipping_enabled;
}
$shipping_enabled(true|false)
Whether shipping is enabled.

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

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

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

wc_shipping_enabled()
wc_shipping_enabled
woocommerce/includes/wc-conditional-functions.php 445
return apply_filters( 'wc_shipping_enabled', get_option( 'woocommerce_ship_to_countries' ) !== 'disabled' );

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

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