woocommerce_quantity_input_type
Controls the quantity input's type attribute.
Использование
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(строка)
- A valid input type attribute value, usually 'number' or 'hidden'.
Список изменений
| С версии 7.4.0 | Введена. |
Где вызывается хук
woocommerce_quantity_input_type
woocommerce/includes/wc-template-functions.php 4722
$args['type'] = apply_filters( 'woocommerce_quantity_input_type', $type );
Где используется хук в 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' ) );