• Resolved prodograw

    (@prodograw)


    Hi Ive added the Force Quotes on export but is not working below is code added to functions.php and tried with code snippets and does not work

    // CSV force quotes
    add_filter('woe_csv_custom_output_func',function ($custom_output,$handle,$data,$delimiter,$linebreak,$enclosure,$is_header) {
    	foreach($data as $k=>$v) 
    		$data[$k] =  $enclosure . str_replace($enclosure, $enclosure . $enclosure, $v) . $enclosure;
    	fwrite($handle, join($delimiter, $data). $linebreak  );
    	return true;  //stop default fputcsv!
    }, 10, 7);
    • This topic was modified 7 years, 2 months ago by prodograw.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter prodograw

    (@prodograw)

    I thought that this would add ” on each item

    e.g
    (full_name) mike pro ends up as “mike pro”

    also this will help on the telephone number keep dropping the first zero on the csv

    Plugin Author algol.plus

    (@algolplus)

    hi

    You can just put this code to “Misc Settings”.
    Try to export data, button “Preview” doesn’t show these changes.

    Don’t forget to switch format to “CSV”.
    thanks, Alex

    Thread Starter prodograw

    (@prodograw)

    Hi no it does not work does not matter where I put the code every export has no “

    Plugin Author algol.plus

    (@algolplus)

    Please, rename .csv to .txt and edit in any text editor.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding Quote Wraps To each item’ is closed to new replies.