PHP Class WC_REST_Product_Categories_Controller

Inheritance: extends WC_REST_Terms_Controller
ファイルを表示 Open project: woocommerce/woocommerce

Protected Properties

Property Type Description
$namespace string Endpoint namespace.
$rest_base string Route base.
$taxonomy string Taxonomy.

Public Methods

Method Description
get_item_schema ( ) : array Get the Category schema, conforming to JSON Schema.
prepare_item_for_response ( WP_Term $item, WP_REST_Request $request ) : WP_REST_Response Prepare a single product category output for response.

Protected Methods

Method Description
update_term_meta_fields ( WP_Term $term, WP_REST_Request $request ) : boolean | WP_Error Update term meta fields.

Method Details

get_item_schema() public method

Get the Category schema, conforming to JSON Schema.
public get_item_schema ( ) : array
return array

prepare_item_for_response() public method

Prepare a single product category output for response.
public prepare_item_for_response ( WP_Term $item, WP_REST_Request $request ) : WP_REST_Response
$item WP_Term Term object.
$request WP_REST_Request
return WP_REST_Response $response

update_term_meta_fields() protected method

Update term meta fields.
protected update_term_meta_fields ( WP_Term $term, WP_REST_Request $request ) : boolean | WP_Error
$term WP_Term
$request WP_REST_Request
return boolean | WP_Error

Property Details

$namespace protected_oe property

Endpoint namespace.
protected string $namespace
return string

$rest_base protected_oe property

Route base.
protected string $rest_base
return string

$taxonomy protected_oe property

Taxonomy.
protected string $taxonomy
return string