wc_shipping_enabled │ filter-hook │ WC 2.6.0

Filters whether shipping is enabled.

Usage

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.

Changelog

Since 2.6.0 Introduced.

Where the hook is called

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' );

Where the hook is used in WooCommerce

Usage not found.