woocommerce_quantity_input_pattern
Использование
add_filter( 'woocommerce_quantity_input_pattern', 'wp_kama_woocommerce_quantity_input_pattern_filter' ); /** * Function for `woocommerce_quantity_input_pattern` filter-hook. * * @param $[0-9]* * * @return */ function wp_kama_woocommerce_quantity_input_pattern_filter( $[0-9]* ){ // filter... return $[0-9]*; }
- $[0-9]*
- -
Где вызывается хук
woocommerce_quantity_input_pattern
woocommerce/includes/wc-template-functions.php 1881
'pattern' => apply_filters( 'woocommerce_quantity_input_pattern', has_filter( 'woocommerce_stock_amount', 'intval' ) ? '[0-9]*' : '' ),