woocommerce_product_ordering_process_moved_products │ хук-событие │ WC 11.2.0

Fires after products have been repositioned during product ordering.

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

add_action( 'woocommerce_product_ordering_process_moved_products', 'wp_kama_woocommerce_product_ordering_process_moved_products_action', 10, 2 );

/**
 * Function for `woocommerce_product_ordering_process_moved_products` action-hook.
 * 
 * @param int            $product_id The product ID that was repositioned.
 * @param array $moved      Moved product positions (product ID → menu_order).
 *
 * @return void
 */
function wp_kama_woocommerce_product_ordering_process_moved_products_action( $product_id, $moved ){
	// action...
}
$product_id(int)
The product ID that was repositioned.
$moved(array<int,int>)
Moved product positions (product ID → menu_order).

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

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

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

WC_AJAX::product_ordering()
woocommerce_product_ordering_process_moved_products
woocommerce/includes/class-wc-ajax.php 2835
do_action( 'woocommerce_product_ordering_process_moved_products', $product_id, $modifications->moved );

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

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