How to change the CSV separator from a custom CSV feed using a WordPress filter
In some cases, you would like to change the CSV separator when creating a product feed with the Custom CSV template. This can be done with the help of the wppfm_separator_for_arrays_in_csv_feed()
As you can see below, the use of the WordPress Hook is very easy and you only have to return the separator you would like to use like a tab, or comma, etc
Hook: changing the CSV separator example
function change_csv_separator() {
// return the separator you would like to use like a tab, | or "
return ' ';
}
add_filter( 'wppfm_separator_for_arrays_in_csv_feed', 'change_csv_separator' );
If you’re not familiar with using filters in your wp-admin, the best and easiest way to do this is by using a plugin like “Code Snippets“. And here you can find a great video explaining the use if this plugin.
After activating the Code Snippets plugin you can use the code in a save way.