WC_Products_Tracking::track_product_category_updated()publicWC 1.0

Send a Tracks event when a product category is updated.

Method of the class: WC_Products_Tracking{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Products_Tracking = new WC_Products_Tracking();
$WC_Products_Tracking->track_product_category_updated( $category_id );
$category_id(int) (required)
Category ID.

WC_Products_Tracking::track_product_category_updated() code WC 8.9.0

public function track_product_category_updated( $category_id ) {
	// phpcs:disable WordPress.Security.NonceVerification.Missing
	// Only track category creation from the edit product screen or the
	// category management screen (which both occur via AJAX).
	if (
		empty( $_POST['action'] ) ||
		( 'editedtag' !== $_POST['action'] && 'inline-save-tax' !== $_POST['action'] )
	) {
		return;
	}
	// phpcs:enable

	WC_Tracks::record_event( 'product_category_update' );
}