WC_Product_CSV_Importer_Controller::sanitize_special_column_name_regex()protectedWC 1.0

Sanitize special column name regex.

Method of the class: WC_Product_CSV_Importer_Controller{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->sanitize_special_column_name_regex( $value );
$value(string) (required)
Raw special column name.

WC_Product_CSV_Importer_Controller::sanitize_special_column_name_regex() code WC 8.7.0

protected function sanitize_special_column_name_regex( $value ) {
	return '/' . str_replace( array( '%d', '%s' ), '(.*)', trim( quotemeta( $value ) ) ) . '/i';
}