Skip to content

Instantly share code, notes, and snippets.

@wpmudev-sls
Last active February 22, 2024 09:53
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 wpmudev-sls/c70f387a6ce3932b81eadbf5fc30dc8c to your computer and use it in GitHub Desktop.
Save wpmudev-sls/c70f387a6ce3932b81eadbf5fc30dc8c to your computer and use it in GitHub Desktop.
[Forminator Pro] - Remove submission time column from csv export
<?php
/**
* Plugin Name: [Forminator Pro] Remove submission time column from csv export
* Description: Remove submission time column from csv export
* Author: Prashant @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_filter( 'forminator_custom_form_export_mappers', 'wpmudev_exclude_time_created_csv', 10, 3 );
function wpmudev_exclude_time_created_csv( $mappers, $model_id, $model ) {
if ( 1609 != $model_id ) { // Please change the form ID.
return $mappers;
}
foreach ( $mappers as $key => $mapper ) {
if ( 'entry_time_created' === $mapper['type'] ) {
unset( $mappers[ $key ] );
}
}
return $mappers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment