Automattic\WooCommerce\Internal\Admin

CategoryLookup::on_create()publicWC 1.0

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

Метод класса: CategoryLookup{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$CategoryLookup = new CategoryLookup();
$CategoryLookup->on_create( $category_id );
$category_id(int) (обязательный)
Term ID being created.

Код CategoryLookup::on_create() WC 8.7.0

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