WordPress at Your Fingertips
function is not described

WC_API_Products::edit_product() public WC 1.0

Edit a product

{} It's a method of the class: WC_API_Products{}

No Hooks.

Return

Array|WP_Error.

Usage

$WC_API_Products = new WC_API_Products();
$WC_API_Products->edit_product( $id, $data );
$id(int) (required)
the product ID
$data(array) (required)
-

Code of WC_API_Products::edit_product() WC 5.5.2

<?php
public function edit_product( $id, $data ) {

	$id = $this->validate_request( $id, 'product', 'edit' );

	if ( is_wp_error( $id ) ) {
		return $id;
	}

	return $this->get_product( $id );
}