WC_Admin_Post_Types::bulk_and_quick_edit_hook( int $post_id, object $post )
Offers a way to hook into save post without causing an infinite loop when quick/bulk saving product info.
Description Description
Parameters Parameters
- $post_id
-
(Required) Post ID being saved.
- $post
-
(Required) Post object being saved.
Source Source
File: includes/admin/class-wc-admin-post-types.php
public function bulk_and_quick_edit_hook( $post_id, $post ) { remove_action( 'save_post', array( $this, 'bulk_and_quick_edit_hook' ) ); do_action( 'woocommerce_product_bulk_and_quick_edit', $post_id, $post ); add_action( 'save_post', array( $this, 'bulk_and_quick_edit_hook' ), 10, 2 ); }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |