woocommerce_quantity_input_step хук-фильтр . WC 1.0
Использование
add_filter( 'woocommerce_quantity_input_step', 'filter_function_name_5543', 10, 2 ); function filter_function_name_5543( $string, $product ){ // filter... return $string; }
- $string
- -
- $product
- -
Где вызывается хук
woocommerce_quantity_input_step
woocommerce/includes/admin/meta-boxes/views/html-order-item.php 70
<input type="number" step="<?php echo esc_attr( apply_filters( 'woocommerce_quantity_input_step', '1', $product ) ); ?>" min="0" autocomplete="off" name="order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" value="<?php echo esc_attr( $item->get_quantity() ); ?>" data-qty="<?php echo esc_attr( $item->get_quantity() ); ?>" size="4" class="quantity" />
woocommerce/includes/admin/meta-boxes/views/html-order-item.php 73
<input type="number" step="<?php echo esc_attr( apply_filters( 'woocommerce_quantity_input_step', '1', $product ) ); ?>" min="0" max="<?php echo absint( $item->get_quantity() ); ?>" autocomplete="off" name="refund_order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund_order_item_qty" />
woocommerce/includes/wc-template-functions.php 1720
'step' => apply_filters( 'woocommerce_quantity_input_step', 1, $product ),