WC_Product_CSV_Importer::parse_download_file_field( string $value )

Parse download file urls, we should allow shortcodes here.


Description Description

Allow shortcodes if present, othersiwe esc_url the value.


Parameters Parameters

$value

(Required) Field value.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/import/class-wc-product-csv-importer.php

	public function parse_download_file_field( $value ) {
		// Absolute file paths.
		if ( 0 === strpos( $value, 'http' ) ) {
			return esc_url_raw( $value );
		}
		// Relative and shortcode paths.
		return wc_clean( $value );
	}


Top ↑

User Contributed Notes User Contributed Notes

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