Automattic\WooCommerce\Internal\VariationGallery

ClassicVariationGalleryAdmin::get_count_textprivateWC 1.0

Get the image count label shown beside the field title.

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

Хуков нет.

Возвращает

Строку.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_count_text( $count ): string;
$count(int) (обязательный)
Number of images.

Код ClassicVariationGalleryAdmin::get_count_text() WC 10.9.1

private function get_count_text( int $count ): string {
	if ( 0 === $count ) {
		return __( 'No images yet', 'woocommerce' );
	}

	return sprintf(
		/* translators: %d number of variation gallery images */
		_n( '%d image', '%d images', $count, 'woocommerce' ),
		$count
	);
}