Automattic\WooCommerce\Blocks\Utils
ProductGalleryUtils::get_product_gallery_image_data
Get the product gallery image data.
Метод класса: ProductGalleryUtils{}
Хуков нет.
Возвращает
Массив. An array of image data for the product gallery.
Использование
$result = ProductGalleryUtils::get_product_gallery_image_data( $product, $size );
- $product(WC_Product) (обязательный)
- The product object to retrieve the gallery images for.
- $size(строка) (обязательный)
- The size of the image to retrieve.
Код ProductGalleryUtils::get_product_gallery_image_data() ProductGalleryUtils::get product gallery image data WC 11.0.1
public static function get_product_gallery_image_data( $product, $size ) {
$all_image_ids = self::get_all_image_ids( $product );
return self::get_image_src_data( $all_image_ids, $size, $product->get_title() );
}