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.


Top ↑

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 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.