WC_REST_Legacy_Products_Controller::save_product_images()protectedWC 1.0

Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Save product images.

Method of the class: WC_REST_Legacy_Products_Controller{}

No Hooks.


null. Nothing (null).


// protected - for code of main (parent) or child class
$result = $this->save_product_images( $product_id, $images );
$product_id(int) (required)
$images(array) (required)


Deprecated since 3.0.0

WC_REST_Legacy_Products_Controller::save_product_images() code WC 8.9.0

protected function save_product_images( $product_id, $images ) {
	$product = wc_get_product( $product_id );

	return set_product_images( $product, $images );