Automattic\WooCommerce\Internal\ProductGallery
ProductMediaGallery::set_stored_video_gallery_items
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() 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;
}