/** * Renders images section of product page. * * @param $product \Jigoshop\Entity\Product The product to render data for. */ public function productImages($product) { $imageClasses = apply_filters('jigoshop\\product\\image_classes', array('featured-image'), $product); $featured = ProductHelper::getFeaturedImage($product, Options::IMAGE_LARGE); $featuredUrl = ProductHelper::hasFeaturedImage($product) ? $this->wp->wpGetAttachmentUrl($this->wp->getPostThumbnailId($product->getId())) : ''; $thumbnails = $this->productService->getAttachments($product, Options::IMAGE_THUMBNAIL)['gallery']; Render::output('shop/product/images', array('product' => $product, 'featured' => $featured, 'featuredUrl' => $featuredUrl, 'thumbnails' => is_array($thumbnails) ? $thumbnails : array(), 'imageClasses' => $imageClasses)); }