WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

woocommerce_blocks_get_php_translation_from_core() WC 1.0

Filter translations so we can retrieve translations from Core when the original and the translated texts are the same (which happens when translations are missing).

Хуков нет.

Возвращает

Строку. WC Blocks translation. In case it's the same as $text, Core translation.

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

woocommerce_blocks_get_php_translation_from_core( $translation, $text, $domain );
$translation(строка) (обязательный)
Translated text based on WC Blocks translations.
$text(строка) (обязательный)
Text to translate.
$domain(строка) (обязательный)
The text domain.

Код woocommerce blocks get php translation from core: woocommerce/packages/woocommerce-blocks/woocommerce-gutenberg-products-block.php WC 4.3.1

<?php
function woocommerce_blocks_get_php_translation_from_core( $translation, $text, $domain ) {
	if ( 'woo-gutenberg-products-block' !== $domain ) {
		return $translation;
	}

	// When translation is the same, that could mean the string is not translated.
	// In that case, load it from core.
	if ( $translation === $text ) {
		return translate( $text, 'woocommerce' ); // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction, WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.TextDomainMismatch
	}
	return $translation;
}