WC_Product_Importer::unescape_data( string $value )

The exporter prepends a ‘ to escape fields that start with =, +, – or @.


Description Description

Remove the prepended ‘ character preceding those characters.


Parameters Parameters

$value

(Required) A string that may or may not have been escaped with '.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/import/abstract-wc-product-importer.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.5.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.