woocommerce_stock_amount хук-фильтр . WC 1.0
Formats a stock amount by running it through a filter.
Использование
add_filter( 'woocommerce_stock_amount', 'filter_function_name_9815' ); function filter_function_name_9815( $amount ){ // filter... return $amount; }
- $amount(число/float)
- Stock amount.
Где вызывается хук
woocommerce_stock_amount
woocommerce/includes/wc-formatting-functions.php 477
return apply_filters( 'woocommerce_stock_amount', $amount );
Где используется хук в ядре WooCommerce
woocommerce/includes/wc-formatting-functions.php 42
add_filter( 'woocommerce_stock_amount', 'intval' ); // Stock amounts are integers by default.