woocommerce_stock_html
Использование
add_filter( 'woocommerce_stock_html', 'wp_kama_woocommerce_stock_html_filter', 10, 3 ); /** * Function for `woocommerce_stock_html` filter-hook. * * @param $html * @param $availability_availability * @param $product * * @return */ function wp_kama_woocommerce_stock_html_filter( $html, $availability_availability, $product ){ // filter... return $html; }
- $html
- -
- $availability_availability
- -
- $product
- -
Где вызывается хук
woocommerce_stock_html
woocommerce/includes/wc-template-functions.php 3681
$html = apply_filters( 'woocommerce_stock_html', $html, $availability['availability'], $product );