Skip to content

Instantly share code, notes, and snippets.

@ameeker
Created August 6, 2014 14:59
Show Gist options
  • Save ameeker/737d50da870095f22686 to your computer and use it in GitHub Desktop.
Save ameeker/737d50da870095f22686 to your computer and use it in GitHub Desktop.
Export Restrict Content Pro Custom Fields with Export
I managed to do this fairly easily by editing the “class-rcp-export-members.php” file. But it would be great if there was a hook there to add in my custom fields?
For reference for people, just add a column to the “csv_cols” function on line 35.
And then add your custom field to the “get_data” data array on line 71 like this:
‘telephone’ => get_user_meta($member->ID, ‘rcp_telephone’, true);
@kay2thebee
Copy link

Nearly perfect. I had to change the quote style on the function param:
‘telephone’ => get_user_meta($member->ID, 'rcp_telephone', true);

Thanks for sharing!

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