WooCommerce Code Reference

WC_Admin_Taxonomies
in package

WC_Admin_Taxonomies class.

Table of Contents

$instance  : WC_Admin_Taxonomies
Class instance.
$default_cat_id  : int
Default category ID.
__construct()  : mixed
Constructor.
add_category_fields()  : mixed
Category thumbnail fields.
create_term()  : mixed
Order term when created (put in position 0).
delete_term()  : mixed
When a term is deleted, delete its meta.
disable_checked_ontop()  : array<string|int, mixed>
Maintain term hierarchy when editing a product.
edit_category_fields()  : mixed
Edit category thumbnail field.
get_instance()  : mixed
Get class instance
handle_product_cat_row_actions()  : mixed
Handle custom row actions.
product_attribute_description()  : mixed
Description for shipping class page to aid users.
product_cat_column()  : string
Thumbnail column value added to category admin.
product_cat_columns()  : array<string|int, mixed>
Thumbnail column added to category admin.
product_cat_description()  : mixed
Description for product_cat page to aid users.
product_cat_notes()  : mixed
Add some notes to describe the behavior of the default category.
product_cat_row_actions()  : array<string|int, mixed>
Adjust row actions.
save_category_fields()  : mixed
Save category fields
scripts_at_product_cat_screen_footer()  : void
Admin footer scripts for the product categories admin screen

Properties

Methods

create_term()

Order term when created (put in position 0).

public create_term(mixed $term_id[, mixed $tt_id = '' ][, string $taxonomy = '' ]) : mixed
Parameters
$term_id : mixed

Term ID.

$tt_id : mixed = ''

Term taxonomy ID.

$taxonomy : string = ''

Taxonomy slug.

Return values
mixed

delete_term()

When a term is deleted, delete its meta.

public delete_term(mixed $term_id) : mixed
Parameters
$term_id : mixed

Term ID.

Tags
deprecated
3.6.0

No longer needed.

Return values
mixed

disable_checked_ontop()

Maintain term hierarchy when editing a product.

public disable_checked_ontop(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

Term checklist args.

Return values
array<string|int, mixed>

edit_category_fields()

Edit category thumbnail field.

public edit_category_fields(mixed $term) : mixed
Parameters
$term : mixed

Term (category) being edited.

Return values
mixed

product_cat_column()

Thumbnail column value added to category admin.

public product_cat_column(string $columns, string $column, int $id) : string
Parameters
$columns : string

Column HTML output.

$column : string

Column name.

$id : int

Product ID.

Return values
string

product_cat_columns()

Thumbnail column added to category admin.

public product_cat_columns(mixed $columns) : array<string|int, mixed>
Parameters
$columns : mixed

Columns array.

Return values
array<string|int, mixed>

product_cat_row_actions()

Adjust row actions.

public product_cat_row_actions(array<string|int, mixed> $actions, object $term) : array<string|int, mixed>
Parameters
$actions : array<string|int, mixed>

Array of actions.

$term : object

Term object.

Return values
array<string|int, mixed>

save_category_fields()

Save category fields

public save_category_fields(mixed $term_id[, mixed $tt_id = '' ][, string $taxonomy = '' ]) : mixed
Parameters
$term_id : mixed

Term ID being saved.

$tt_id : mixed = ''

Term taxonomy ID.

$taxonomy : string = ''

Taxonomy slug.

Return values
mixed

Admin footer scripts for the product categories admin screen

public scripts_at_product_cat_screen_footer() : void
Return values
void