AbstractProductGrid::get_image_html() – Get the product image.

You appear to be a bot. Output may be restricted

Description

Get the product image.

Usage

$string = AbstractProductGrid::get_image_html( $product );

Parameters

$product
( \WC_Product ) required – Product.

Returns

string

Source

File name: woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractProductGrid.php
Lines:

1 to 3 of 3
  protected function get_image_html( $product ) {
    return '<div class="wc-block-grid__product-image">' . $product->get_image( 'woocommerce_thumbnail' ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  }
 

 View on GitHub View on Trac