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', 'filter_function_name_5568', 10, 2 ); function filter_function_name_5568( $string, $that ){ // filter... return $string; }
- $string
- -
- $that
- -
Где вызывается хук
woocommerce_product_is_in_stock
woocommerce/includes/abstracts/abstract-wc-product.php 1594
return apply_filters( 'woocommerce_product_is_in_stock', 'outofstock' !== $this->get_stock_status(), $this );