WC_Product_Importer::unescape_data
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.
Returns
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() WC Product Importer::unescape data code WC 10.6.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;
}