WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

CategoryLookup::on_create() public WC 1.0

When a product category gets created, add a new lookup row.

{} It's a method of the class: CategoryLookup{}

No Hooks.

Return

null. Nothing.

Usage

$CategoryLookup = new CategoryLookup();
$CategoryLookup->on_create( $category_id );
$category_id(int) (required)
Term ID being created.

Code of CategoryLookup::on_create() WC 5.7.1

public function on_create( $category_id ) {
	// If WooCommerce is being installed on a multisite, lookup tables haven't been created yet.
	if ( 'yes' === get_transient( 'wc_installing' ) ) {
		return;
	}

	$this->update( $category_id );
}