WooCommerce Code Reference

WC_Admin_Attributes
in package

WC_Admin_Attributes Class.

Table of Contents

$edited_attribute_id  : int
Edited attribute ID.
add_attribute()  : mixed
Add Attribute admin panel.
edit_attribute()  : mixed
Edit Attribute admin panel.
output()  : mixed
Handles output of the attributes page in admin.
get_posted_attribute()  : array<string|int, mixed>
Get and sanitize posted attribute data.
process_add_attribute()  : bool|WP_Error
Add an attribute.
process_delete_attribute()  : bool
Delete an attribute.
process_edit_attribute()  : bool|WP_Error
Edit an attribute.

Properties

Methods

edit_attribute()

Edit Attribute admin panel.

public static edit_attribute() : mixed

Shows the interface for changing an attributes type between select and text.

Return values
mixed

output()

Handles output of the attributes page in admin.

public static output() : mixed

Shows the created attributes and lets you add new ones or edit existing ones. The added attributes are stored in the database and can be used for layered navigation.

Return values
mixed

get_posted_attribute()

Get and sanitize posted attribute data.

private static get_posted_attribute() : array<string|int, mixed>
Return values
array<string|int, mixed>