WC_Products_Tracking::track_product_category_updated()
Send a Tracks event when a product category is updated.
Method of the class: WC_Products_Tracking{}
No Hooks.
Return
null
. Nothing.
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() WC Products Tracking::track product category updated code WC 7.7.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' ); }