Automattic\WooCommerce\Internal\ProductGallery

ProductMediaGallery::set_stored_video_gallery_items │ public static │ WC 1.0

Normalize and store video gallery items for a product.

Method of the class: ProductMediaGallery{}

No Hooks.

Returns

array. Stored video gallery items.

Usage

$result = ProductMediaGallery::set_stored_video_gallery_items( $product, $video_gallery ): array;
$product(WC_Product) (required)
Product object.
$video_gallery(array) (required)
Video gallery data.

ProductMediaGallery::set_stored_video_gallery_items() code WC 11.1.2

public static function set_stored_video_gallery_items(
	WC_Product $product,
	array $video_gallery
): array {
	$video_gallery = self::normalize_video_gallery_items( $video_gallery );

	self::update_video_gallery_meta( $product, $video_gallery );

	return $video_gallery;
}