WC_Product_Importer::unescape_data()protectedWC 3.5.2

The exporter prepends a ' to escape fields that start with =, +, - or @. Remove the prepended ' character preceding those characters.

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

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->unescape_data( $value );
$value(строка) (обязательный)
A string that may or may not have been escaped with '.

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

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

Код WC_Product_Importer::unescape_data() WC 8.7.0

protected function unescape_data( $value ) {
	$active_content_triggers = array( "'=", "'+", "'-", "'@" );

	if ( in_array( mb_substr( $value, 0, 2 ), $active_content_triggers, true ) ) {
		$value = mb_substr( $value, 1 );
	}

	return $value;
}