Last active
January 31, 2020 18:19
-
-
Save slaFFik/9c3734383b645c1663ab2a22bf20803f to your computer and use it in GitHub Desktop.
WPForms: change the export CSV file separator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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 (likewp-mail-smtp.php
etc). This helps keep everything organized.