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 4710
$args['type'] = apply_filters( 'woocommerce_quantity_input_type', $type );
Where the hook is used in WooCommerce
woocommerce/src/Blocks/BlockTypes/AddToCartWithOptions/GroupedProductItemSelector.php 49
add_filter( 'woocommerce_quantity_input_type', array( $this, 'set_quantity_input_type' ) );
woocommerce/src/Blocks/BlockTypes/AddToCartWithOptions/GroupedProductItemSelector.php 71
remove_filter( 'woocommerce_quantity_input_type', array( $this, 'set_quantity_input_type' ) );