woocommerce_product_csv_importer_check_import_file_path

woocommerce_product_csv_importer_check_import_file_path

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.6.5.1

apply_filters('woocommerce_product_csv_importer_check_import_file_path') is found 1 times:

  • /includes/admin/importers/class-wc-product-csv-importer-controller.php line 101
    		 *
    		 * @param bool   $check_import_file_path If the import file path should be checked.
    		 * @param string $file                   Path of the file to be checked.
    		 */
    		if ( $check_path && apply_filters( 'woocommerce_product_csv_importer_check_import_file_path', true, $file ) && false !== stripos( $file, '://' ) ) {
    			return false;
    		}
    
    		$valid_filetypes = self::get_valid_csv_filetypes();
    		$filetype        = wp_check_filetype( $file, $valid_filetypes );
    		if ( in_array( $filetype['type'], $valid_filetypes, true ) ) {