Automattic\WooCommerce\Internal\ProductGallery

ProductMediaGallery::get_stored_video_gallery_items │ public static │ WC 1.0

Get video gallery items stored for a product.

Method of the class: ProductMediaGallery{}

No Hooks.

Returns

array.

Usage

$result = ProductMediaGallery::get_stored_video_gallery_items( $product ): array;
$product(WC_Product) (required)
Product object.

ProductMediaGallery::get_stored_video_gallery_items() code WC 11.1.2

public static function get_stored_video_gallery_items( WC_Product $product ): array {
	$value = $product->get_id()
		? get_post_meta( $product->get_id(), self::VIDEO_GALLERY_META_KEY, true )
		: $product->get_meta( self::VIDEO_GALLERY_META_KEY, true, 'edit' );

	return self::decode_video_gallery_meta( $value );
}