WordPress at Your Fingertips
function is not described

WC_REST_Products_V1_Controller::save_product() public WC 1.0

Saves a product to the database.

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

No Hooks.

Return

Int.

Usage

$WC_REST_Products_V1_Controller = new WC_REST_Products_V1_Controller();
$WC_REST_Products_V1_Controller->save_product( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Code of WC_REST_Products_V1_Controller::save_product() WC 5.9.0

public function save_product( $request ) {
	$product = $this->prepare_item_for_database( $request );
	return $product->save();
}