The following actions and filter hooks are available in this Add On.
apply_filters( 'pmproiucsv_import_capability', string $capability );
Change the capability required to see the Import Members screen and run an import. The default is manage_options, or manage_network_users on multisite. An import can set the role, password, and user meta of any user, so only lower this for users you trust with full control of the site.
apply_filters( 'pmproiucsv_required_import_headers', array( 'user_email' ) );
Define the required headers for a member import CSV file. The browser warns before upload if one of these headers is missing, and the import stops if one of these fields is not mapped on the mapping screen.
apply_filters( 'pmproiufcsv_cancel_prev_sub_on_import', false ); apply_filters( 'pmproiucsv_cancel_prev_sub_on_import', false );
These filters are, by default, set to false. This prevents the import process from cancelling existing subscriptions at the gateway. To change the default behavior, return true from both filters. Returning true from only one of them has no effect in the current version. This change will cancel subscriptions at the gateway during the import process if the member’s level changes or is cancelled.
apply_filters( 'pmprocsv_ajax_import_batch', 50 );
Adjust the number of imports per iteration. Default is 50 imports per iteration.
apply_filters( 'pmproiucsv_mapping_fields', array $fields );
Add, remove, or relabel the fields in the Maps To dropdown on the mapping screen. $fields is an array of groups keyed by group key, where each group has a label and a fields array of field key => label. Add Ons use this to add their own import fields.
apply_filters( 'pmproiucsv_field_aliases', array $aliases );
Add column headings that should be mapped to a field automatically. $aliases is an array of lowercase column heading => field key, such as 'email' => 'user_email'.
apply_filters( 'pmproiucsv_import_userdata', array $userdata, array $usermeta );
Filter the WordPress user data (such as user_email, first_name, and role) for a row before the user is created or updated. If this returns an empty array, the row is skipped.
apply_filters( 'pmproiucsv_import_usermeta', array $usermeta, array $userdata );
Filter the user meta for a row before it’s saved. This includes the membership columns, which the Add On renames with an import_ prefix (for example, import_membership_id) and removes after the membership is imported.
apply_filters( 'pmproiucsv_errors_filter', array $errors, array $user_ids );
Filter the errors for the current batch before they’re written to the error log. $errors is an array of WP_Error objects keyed by row, and $user_ids holds the IDs of users imported in the batch.
do_action( 'pmproiucsv_after_init' );
Fires after the Add On has fully initialized, allowing developers to run custom code once all core plugin setup is complete.
do_action( 'pmproiucsv_import_page_inside_table_bottom' );
Insert additional form fields or settings at the bottom of the import options table on the Import Members admin page.
do_action( 'pmproiucsv_import_page_after_table' );
Add custom content or fields below the import options table but before the submit button on the Import Members admin page.
do_action( 'pmproiucsv_pre_user_import', $userdata, $usermeta, $user );
Fires immediately before a single user is imported, allowing developers to modify or act on the user data and metadata before creation or update. $user is the existing user matched by the ID column, or false. Matches by username or email address happen after this action.
do_action( 'pmproiucsv_post_user_import', $user_id );
Fires immediately after a single user is successfully imported, allowing developers to run custom logic such as logging, notifications, or additional user setup.
do_action( 'pmproiucsv_post_users_import', $user_ids, $errors );
Perform actions after each batch of rows is processed, such as summary logging or follow-up tasks. $user_ids holds the IDs of users imported in the batch, and $errors holds any WP_Error objects. Imports from the admin run in batches of 50 rows by default, so this fires once per batch.
do_action( 'pmproiucsv_after_member_import', $user, $membership_id, $order );
Action hook to run code after a single user’s membership information is imported. This runs for every imported row, including rows without a membership_id. $order is the order created during import, or null if no order was created.
The Add On also checks these constants:
define( 'PMPROIUCSV_CSV_DELIMITER', ';' );
Set the character that separates columns in your CSV file. The default is a comma. Add this to your wp-config.php file so it’s defined before the Add On loads.
defined( 'DOING_PMPRO_IMPORT' )
This constant is defined as true when an import runs. Check for it in custom code that should behave differently during an import, such as code hooked to membership level changes.
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 »
Last updated on November 12, 2026