WC_Template_Loader::unsupported_theme_single_featured_image_filter()public staticWC 3.3.0

Prevent the main featured image on product pages because there will be another featured image in the gallery.

Метод класса: WC_Template_Loader{}

Хуков нет.

Возвращает

Строку.

Использование

$result = WC_Template_Loader::unsupported_theme_single_featured_image_filter( $html );
$html(строка) (обязательный)
Img element HTML.

Список изменений

С версии 3.3.0 Введена.

Код WC_Template_Loader::unsupported_theme_single_featured_image_filter() WC 8.7.0

public static function unsupported_theme_single_featured_image_filter( $html ) {
	if ( self::in_content_filter() || ! is_product() || ! is_main_query() ) {
		return $html;
	}

	return '';
}