wpcrm_system_export_get_data

The  wpcrm_system_export_get_data filter controls the data that is exported to a CSV file. This filter is passed one variable $data, which is an array of data that should be output into the export file.

An example of the  $data array would look like this:

$data[$id] = array(
     'contact_name'         => get_the_title( $id ),
     'contact_id'         => $id,
     'prefix'             => get_post_meta( $id, '_wpcrm_contact-name-prefix', true ),
     'first_name'        => get_post_meta( $id, '_wpcrm_contact-first-name', true ),
     'last_name'            => get_post_meta( $id, '_wpcrm_contact-last-name', true ),
     'organization'        => get_the_title( get_post_meta( $id, '_wpcrm_contact-attach-to-organization', true ) ),
     'organization_id'        => get_post_meta( $id, '_wpcrm_contact-attach-to-organization', true ),
     'role'            => get_post_meta( $id, '_wpcrm_contact-role', true ),
     'street_1'            => get_post_meta( $id, '_wpcrm_contact-address1', true ),
     'street_2'            => get_post_meta( $id, '_wpcrm_contact-address2', true ),
     'city'            => get_post_meta( $id, '_wpcrm_contact-city', true ),
     'state'            => get_post_meta( $id, '_wpcrm_contact-state', true ),
     'postal_code'        => get_post_meta( $id, '_wpcrm_contact-postal', true ),
     'country'            => get_post_meta( $id, '_wpcrm_contact-country', true ),
     'phone'            => get_post_meta( $id, '_wpcrm_contact-phone', true ),
     'fax'            => get_post_meta( $id, '_wpcrm_contact-fax', true ),
     'mobile'            => get_post_meta( $id, '_wpcrm_contact-mobile-phone', true ),
     'email'            => get_post_meta( $id, '_wpcrm_contact-email', true ),
     'url'            => get_post_meta( $id, '_wpcrm_contact-website', true ),
     'information'        => esc_html( get_post_meta( $id, '_wpcrm_contact-additional', true ) ) 
);

The  $id variable is the ID of the record, in this case, it’s a contact’s record.

With this filter, you can add new data, or remove data from the export as necessary.