WC_REST_Product_Attribute_Terms_V1_Controller::update_term_meta_fields()protectedWC 1.0

Update term meta fields.

Method of the class: WC_REST_Product_Attribute_Terms_V1_Controller{}

No Hooks.

Return

true|false|WP_Error.

Usage

// protected - for code of main (parent) or child class
$result = $this->update_term_meta_fields( $term, $request );
$term(WP_Term) (required)
-
$request(WP_REST_Request) (required)
-

WC_REST_Product_Attribute_Terms_V1_Controller::update_term_meta_fields() code WC 8.7.0

protected function update_term_meta_fields( $term, $request ) {
	$id = (int) $term->term_id;

	update_term_meta( $id, 'order_' . $this->taxonomy, $request['menu_order'] );

	return true;
}