WordPress at Your Fingertips
function is not described

WC_Product::set_image_id() public WC 3.0.0

Set main image ID.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_image_id( $image_id );
$image_id(int|string)
Product image id.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_image_id() WC 5.5.2

<?php
public function set_image_id( $image_id = '' ) {
	$this->set_prop( 'image_id', $image_id );
}