wc_importer_default_special_english_mappings()WC 3.1.0

Add English special mapping placeholders when not using English as current language.

Хуков нет.

Возвращает

Массив.

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

wc_importer_default_special_english_mappings( $mappings );
$mappings(массив) (обязательный)
Importer columns mappings.

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

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

Код wc_importer_default_special_english_mappings() WC 8.7.0

function wc_importer_default_special_english_mappings( $mappings ) {
	if ( 'en_US' === wc_importer_current_locale() && is_array( $mappings ) && count( $mappings ) > 0 ) {
		return $mappings;
	}

	$new_mappings = array(
		'Attribute %d name'     => 'attributes:name',
		'Attribute %d value(s)' => 'attributes:value',
		'Attribute %d visible'  => 'attributes:visible',
		'Attribute %d global'   => 'attributes:taxonomy',
		'Attribute %d default'  => 'attributes:default',
		'Download %d ID'        => 'downloads:id',
		'Download %d name'      => 'downloads:name',
		'Download %d URL'       => 'downloads:url',
		'Meta: %s'              => 'meta:',
	);

	return array_merge( $mappings, $new_mappings );
}