woocommerce_after_product_ordering
When products ordering update completed.
Использование
add_action( 'woocommerce_after_product_ordering', 'wp_kama_woocommerce_after_product_ordering_action', 10, 2 ); /** * Function for `woocommerce_after_product_ordering` action-hook. * * @param int $product_id The product ID that was repositioned. * @param array$all_positions All product sort positions (product ID → actual menu_order * value). * * @return void */ function wp_kama_woocommerce_after_product_ordering_action( $product_id, $all_positions ){ // action... }
- $product_id(int)
- The product ID that was repositioned.
- $all_positions(array<int,int>)
- All product sort positions (product ID → actual menu_order value).
Список изменений
| С версии 3.1.0 | Введена. |
Где вызывается хук
woocommerce_after_product_ordering
woocommerce/includes/class-wc-ajax.php 2803
do_action( 'woocommerce_after_product_ordering', $product_id, $menu_orders );