Automattic\WooCommerce\Blocks\Utils
ProductGalleryUtils::get_product_gallery_image_count
Deprecated since 1.1.0. It is no longer supported and may be removed in future releases. Use
get_product_gallery_media_count instead.Get the product gallery image count.
Method of the class: ProductGalleryUtils{}
No Hooks.
Returns
int. The number of media items in the product gallery.
Usage
$result = ProductGalleryUtils::get_product_gallery_image_count( $product );
- $product(WC_Product) (required)
- The product object to retrieve the gallery images for.
Changelog
| Deprecated since 11.1.0 | Use get_product_gallery_media_count instead. |
ProductGalleryUtils::get_product_gallery_image_count() ProductGalleryUtils::get product gallery image count code WC 11.1.2
public static function get_product_gallery_image_count( $product ) {
wc_deprecated_function( __METHOD__, '11.1.0', 'get_product_gallery_media_count' );
return self::get_product_gallery_media_count( $product );
}