Automattic\WooCommerce\Internal\VariationGallery

ClassicVariationGalleryAdmin::get_count_text │ private │ WC 1.0

Get the image count label shown beside the field title.

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

Хуков нет.

Возвращает

string.

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

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

Код ClassicVariationGalleryAdmin::get_count_text() WC 11.2.2

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
	);
}