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.

Method of the class: WC_Product_Importer{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->unescape_data( $value );
$value(string) (required)
A string that may or may not have been escaped with '.

Changelog

Since 3.5.2 Introduced.

WC_Product_Importer::unescape_data() code WC 9.4.2

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