Automattic\WooCommerce\Internal\Admin
CategoryLookup::before_edit()
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() 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; }