WordPress at Your Fingertips
function is not described

WC_Product_Importer::unescape_data() protected WC 3.5.2

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

{} It's a 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.

Code of WC_Product_Importer::unescape_data() WC 5.8.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;
}