WordPress at Your Fingertips
function is not described

WC_Product::set_gallery_image_ids() public WC 3.0.0

Set gallery attachment ids.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_gallery_image_ids( $image_ids );
$image_ids(array) (required)
List of image ids.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_gallery_image_ids() WC 5.5.2

<?php
public function set_gallery_image_ids( $image_ids ) {
	$image_ids = wp_parse_id_list( $image_ids );

	$this->set_prop( 'gallery_image_ids', $image_ids );
}