WooCommerce Code Reference

Search results

WC_Admin_Attributes

WC_Admin_Attributes Class.

Table of Contents

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

Properties

Methods

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
Return values
array

process_add_attribute()

Add an attribute.

private static process_add_attribute( ) : bool|WP_Error
Return values
bool|WP_Error

process_edit_attribute()

Edit an attribute.

private static process_edit_attribute( ) : bool|WP_Error
Return values
bool|WP_Error

process_delete_attribute()

Delete an attribute.

private static process_delete_attribute( ) : bool
Return values
bool

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

add_attribute()

Add Attribute admin panel.

public static add_attribute( ) : mixed

Shows the interface for adding new attributes.

Return values
mixed
Back to the top