Automattic\WooCommerce\Internal\Admin

CategoryLookup::on_create()publicWC 1.0

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

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код CategoryLookup::on_create() WC 6.4.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 );
}