woocommerce_quantity_input_type
Controls the quantity input's type attribute.
Usage
add_filter( 'woocommerce_quantity_input_type', 'wp_kama_woocommerce_quantity_input_type_filter' ); /** * Function for `woocommerce_quantity_input_type` filter-hook. * * @param string $type A valid input type attribute value, usually 'number' or 'hidden'. * * @return string */ function wp_kama_woocommerce_quantity_input_type_filter( $type ){ // filter... return $type; }
- $type(string)
- A valid input type attribute value, usually 'number' or 'hidden'.
Changelog
Since 7.4.0 | Introduced. |
Where the hook is called
woocommerce_quantity_input_type
woocommerce/includes/wc-template-functions.php 2050
$args['type'] = apply_filters( 'woocommerce_quantity_input_type', $type );