Automattic\WooCommerce\Internal\Admin

CategoryLookup::before_edit()publicWC 1.0

Store edits so we know when the parent ID changes.

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

Хуков нет.

Возвращает

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

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

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

Код CategoryLookup::before_edit() WC 8.7.0

public function before_edit( $category_id ) {
	$category                                  = get_term( $category_id, 'product_cat' );
	$this->edited_product_cats[ $category_id ] = $category->parent;
}