woocommerce_hide_invisible_variations хук-фильтрWC 1.0

Filter woocommerce_hide_invisible_variations optionally hide invisible variations (disabled variations and variations with empty price).

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

add_filter( 'woocommerce_hide_invisible_variations', 'wp_kama_woocommerce_hide_invisible_variations_filter', 10, 3 );
function wp_kama_woocommerce_hide_invisible_variations_filter( $true, $id, $variation ){
	// filter...

	return $true;
}
$true
-
$id
-
$variation
-

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

WC_Product_Variable::get_available_variations()
woocommerce_hide_invisible_variations
WC_Product_Variable::variation_is_available()
woocommerce_hide_invisible_variations
woocommerce/includes/class-wc-product-variable.php 307
if ( apply_filters( 'woocommerce_hide_invisible_variations', true, $this->get_id(), $variation ) && ! $variation->variation_is_visible() ) {
woocommerce/includes/class-wc-product-variable.php 339
if ( apply_filters( 'woocommerce_hide_invisible_variations', true, $this->get_id(), $variation ) && ! $variation->variation_is_visible() ) {

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

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