woocommerce_quantity_input_step_admin хук-фильтрWC 5.8.0

Filter to change the product quantity stepping in the order editor of the admin area.

Использование

add_filter( 'woocommerce_quantity_input_step_admin', 'wp_kama_woocommerce_quantity_input_step_admin_filter', 10, 3 );

/**
 * Function for `woocommerce_quantity_input_step_admin` filter-hook.
 * 
 * @param string     $step    The current step amount to be used in the quantity editor.
 * @param WC_Product $product The product that is being edited.
 * @param string     $context The context in which the quantity editor is shown, 'edit' or 'refund'.
 *
 * @return string
 */
function wp_kama_woocommerce_quantity_input_step_admin_filter( $step, $product, $context ){

	// filter...
	return $step;
}
$step(строка)
The current step amount to be used in the quantity editor.
$product(WC_Product)
The product that is being edited.
$context(строка)
The context in which the quantity editor is shown, 'edit' or 'refund'.

Список изменений

С версии 5.8.0 Введена.

Где вызывается хук

В файле: /includes/admin/meta-boxes/views/html-order-item.php
woocommerce_quantity_input_step_admin
woocommerce/includes/admin/meta-boxes/views/html-order-item.php 80
$step_edit   = apply_filters( 'woocommerce_quantity_input_step_admin', $step, $product, 'edit' );
woocommerce/includes/admin/meta-boxes/views/html-order-item.php 81
$step_refund = apply_filters( 'woocommerce_quantity_input_step_admin', $step, $product, 'refund' );

Где используется хук в WooCommerce

Использование не найдено.