Paid Memberships Pro’s Import Members From CSV Add On lets you bulk-import members and their custom data from a spreadsheet. Most fields map over cleanly: a name, an email address, a single-choice dropdown. Fields that store more than one value, like a Select2 multi-select or a Checkbox Group, need a different format, because a CSV cell can only ever hold a single string, not a PHP array.
If the field you are importing is a PMPro User Field, the Import Members From CSV Add On handles multi-value entries for you; this code is not needed. This recipe is for the other case: user meta added by a different plugin, or a custom field that is not a PMPro User Field, where you need to convert a CSV string into a proper array yourself before it saves.
Do You Need This Recipe?
This recipe applies if all of the following are true:
- You are importing members with the Import Members From CSV Add On.
- One of your CSV columns needs to store multiple values (a multi-select, checkbox group, or similar field).
- That field is not a PMPro User Field. If it is a User Field, you do not need this snippet. The Add On handles multi-value User Fields on its own.
- The field belongs to another plugin, or is a custom user meta key not managed by PMPro.
Best Practices and Considerations
- Back up your users table before running any bulk import. Test with a handful of rows first.
- In your CSV, wrap multiple values in curly braces, separated by commas:
{value1,value2,value3}. Individual values cannot contain a comma, since that is the separator this recipe splits on. - Make sure you are running the current, standalone version of the Import Members From CSV Add On. It no longer depends on a separate free plugin.
About the Code Recipe
The Import Members From CSV Add On runs a filter, pmproiucsv_import_usermeta, on every imported row just before it saves that user’s meta. This snippet hooks into that filter, looks for any value wrapped in curly braces, strips the braces, and splits the remaining string into a PHP array on each comma. Values that are not wrapped in curly braces pass through unchanged.
Step-by-Step Implementation Guide
- Confirm the field you are importing is not a PMPro User Field (see above).
- Add the code recipe below to your site using a snippet manager or a site-specific plugin.
- In your CSV file, format the column’s values as
{value1,value2,value3}. - Run your import through the Import Members From CSV Add On as usual.
- Open a test user’s profile and confirm the entries are saved as separate values, not one long string.
Understanding the pmproiucsv_import_usermeta Filter
The filter receives two arguments:
$meta(array): the meta key/value pairs about to be saved for the current row.$userdata(array): the WordPress userdata for the row being imported (login, email, and so on).
Your callback must return the (possibly modified) $meta array.
The Code Recipe
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
How to Customize This Code Recipe
- Different delimiter: If your data uses a separator other than a comma, change
explode( ',', $string )to match. - Target one specific field: Add a check like
if ( 'your_meta_key' !== $key ) { continue; }inside the loop to limit conversion to a single column.
Related Resources
Get Support From Our Team of Experts
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »


