woocommerce_product_bulk_and_quick_edit хук-событиеWC 3.0.0

Offers a way to hook into save post without causing an infinite loop when quick/bulk saving product info.

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

add_action( 'woocommerce_product_bulk_and_quick_edit', 'wp_kama_woocommerce_product_bulk_and_quick_edit_action', 10, 2 );

/**
 * Function for `woocommerce_product_bulk_and_quick_edit` action-hook.
 * 
 * @param int    $post_id Post ID being saved.
 * @param object $post    Post object being saved.
 *
 * @return void
 */
function wp_kama_woocommerce_product_bulk_and_quick_edit_action( $post_id, $post ){

	// action...
}
$post_id(int)
Post ID being saved.
$post(объект)
Post object being saved.

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

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

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

WC_Admin_Post_Types::bulk_and_quick_edit_hook()
woocommerce_product_bulk_and_quick_edit
woocommerce/includes/admin/class-wc-admin-post-types.php 290
do_action( 'woocommerce_product_bulk_and_quick_edit', $post_id, $post );

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

woocommerce/includes/admin/class-wc-admin-post-types.php 72
add_action( 'woocommerce_product_bulk_and_quick_edit', array( $this, 'bulk_and_quick_edit_save_post' ), 10, 2 );