This post covers how to export your Members List to CSV. We’ll cover the default columns included in the export, as well as a method to add additional user data to the file.
Access the Members List Export
The “Export to CSV” feature of Paid Memberships Pro is located on the Memberships > Members List admin page. Here you will see your full Members List, which can be filtered based on several features, including Membership Level, Status, or via search. The exported CSV file is based on the active filter in the current view. If you would like to add additional data to this admin page or allow for more detailed filtering, see:
Default Fields Included in the Members List Export
The basic CSV export will include these fields:
- billing firstname
- billing lastname
- initial payment
Adding Additional Data to the Export
There are a few methods to add data to your CSV export.
The easiest method applies to fields that are created via the Register Helper Add On. The code that adds your additional fields will simply need to be updated with attribute
memberslistcsv => true. See detailed information on adding fields via Register Helper here.
If you need to add fields that were not created via Register Helper, you will need a custom function that uses the hook:
pmpro_members_list_csv_extra_columns . For example, the code recipe below demonstrates how to add fields from the
wp_usermeta tables as well as fields added via BuddyPress. There may be other custom tables you need to pull in data from, in which case you’d need to access the user information in another way (dependent on the plugin you are trying to interact with).
The Code Recipe
Proper documentation is critical to making sure Paid Memberships Pro users can take full advantage of all plugin features. That’s why we’re devoting time to improving the core plugin and add on documentation throughout this site.
Until now, we didn’t have a central spot that described how to use the plugin’s included and “code recipe” shortcodes. We just added a page with three sections for the different “types” of shortcodes in Paid Memberships Pro.
- Page Shortcodes that generate the forms and display elements for pages assigned under Memberships > Page Settings in the admin.
- General Shortcodes that can be used anywhere on your site for various features.
- Shortcode Recipes that offer PMPro Core and Plus members access to specialty shortcodes not currently part of the core plugin.
View Shortcode Docs
There are also shortcodes available in specific add ons, such as the Member Directory and Profile Pages Add On, that may eventually get some overlapping documentation in this section.
Hooks and Filters Documentation
Inspired by the formatting of the WordPress.org Developer Resource site, we’ve improved the display, deep linking to GitHub, and example recipes for our library of hooks and filters.
You’ll see the documentation here build out over the next couple weeks. The first phase was updating all existing hooks and filters in the library, then we added 25 new hooks and 78 new filters that were missing documentation. These hooks and filters had been added to the core plugin but not yet documented.
We also are setting up a system that links the hook or filter to code recipes we’ve published that leverage that hook or filter. This should help designers and developers in the future who have identified a hook they need to use, but want to see some examples of how you can use that hook to achieve a desired outcome.
View Hooks and Filters Docs
Documentation is an ongoing effort.
In doing all of this, we have uncovered more places where documentation would be useful, including a section to show all the PHP functions included in PMPro (like the pmpro_hasMembershipLevel function) that you can make use of in your custom projects or plugins and themes that offer integration. It’s in the works 🙂
If you’d like to tighten up your checkout page, the code recipe below has filters to hide the confirm email or confirm password fields on membership checkout.
The Code Recipe
Copy and paste this code recipe into a helper PMPro Customizations plugin.
This code recipe outlines a method to require a member have “Level 1” Membership in order to complete checkout for “Level 2” membership.
The default membership account page (using shortcode ‘pmpro_account’) displays a list of Member Links. This link list can be customized by adding links to the top or bottom of that list through a custom filter. Links can be added for all members or for specific membership levels.