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

Returns whether or not the product can be purchased. This returns true for 'instock' and 'onbackorder' stock statuses.

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

add_filter( 'woocommerce_product_is_in_stock', 'wp_kama_woocommerce_product_is_in_stock_filter', 10, 2 );

/**
 * Function for `woocommerce_product_is_in_stock` filter-hook.
 * 
 * @param  $string 
 * @param  $that   
 *
 * @return 
 */
function wp_kama_woocommerce_product_is_in_stock_filter( $string, $that ){

	// filter...
	return $string;
}
$string
-
$that
-

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

WC_Product::is_in_stock()
woocommerce_product_is_in_stock
woocommerce/includes/abstracts/abstract-wc-product.php 1710
return apply_filters( 'woocommerce_product_is_in_stock', 'outofstock' !== $this->get_stock_status(), $this );

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

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