WC_Product_CSV_Importer::parse_download_file_field
Parse download file urls, we should allow shortcodes here.
Allow shortcodes if present, otherwise esc_url the value.
Метод класса: WC_Product_CSV_Importer{}
Хуков нет.
Возвращает
Строку.
Использование
$WC_Product_CSV_Importer = new WC_Product_CSV_Importer(); $WC_Product_CSV_Importer->parse_download_file_field( $value );
- $value(строка) (обязательный)
- Field value.
Код WC_Product_CSV_Importer::parse_download_file_field() WC Product CSV Importer::parse download file field WC 10.9.4
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 );
}