• Hello.
    I’m trying to exclude some fields in export csv file.
    I am using this filter but do not works.
    Could you give an orientation about this?
    Thank you.

    add_filter( 'wpmem_export_args', 'my_export_args' );
     
    function my_export_args( $args ) {
         
        $args['exclude_fields'] = array( 'password', 'confirm_password', 'confirm_email', 'billing_country', 'description', 'tos', 'billing_address_2', 'billing_city', 'billing_postcode', 'billing_state' );
     
        return $args;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Wouldn’t it be easier to massage the output?

    Plugin Author Chad Butler

    (@cbutlerjr)

    The “exclude_fields” parameter in wpmem_export_args was deprecated in version 3.4 (“export_fields” was also deprecated).

    The “fields” parameter contains the fields being exported. You can use unset() to remove values from that array. Or, you can use thewpmem_export_fields filter hook which will contain an array of the fields to be exported (so also unsetting existing values or returning an entirely new array of field meta keys).

    wpmem_export_fields does not seem to be included in the current documentation and the deprecated parameters in wpmem_export_args are not reflected there, either, but I will get those updated. However, all of what I noted above is included in inline documentation in class-wp-members-user-export.php.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude fields on users export’ is closed to new replies.