Skip to content

Instantly share code, notes, and snippets.

@slaFFik
Last active January 31, 2020 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slaFFik/9c3734383b645c1663ab2a22bf20803f to your computer and use it in GitHub Desktop.
Save slaFFik/9c3734383b645c1663ab2a22bf20803f to your computer and use it in GitHub Desktop.
WPForms: change the export CSV file separator.
<?php
// For WPForms < v1.5.5, but should work with the latest version as well.
add_filter(
'wpforms_csv_export_separator',
function( $sep ) {
return ';';
}
);
// Snippet below works since WPForms v1.5.5.
add_filter(
'wpforms_pro_admin_entries_export_configuration',
function( $config ) {
$config['csv_export_separator'] = ';';
return $config;
}
);
@slaFFik
Copy link
Author

slaFFik commented Jan 31, 2020

@fcamichel
Oh, correct, that's not the problem with the filter, but with the hooks loading order.

I usually create wp-content/mu-plugins/wpforms.php and put there all the filters/actions that are related to the WPForms plugin, and do the same for other plugins (like wp-mail-smtp.php etc). This helps keep everything organized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment