Automattic\WooCommerce\Internal\ProductGallery
ProductMediaGallery::get_stored_video_gallery_items
Get video gallery items stored for a product.
Метод класса: ProductMediaGallery{}
Хуков нет.
Возвращает
array.
Использование
$result = ProductMediaGallery::get_stored_video_gallery_items( $product ): array;
- $product(WC_Product) (обязательный)
- Product object.
Код ProductMediaGallery::get_stored_video_gallery_items() ProductMediaGallery::get stored video gallery items WC 11.3.0
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 );
}