- Upload the “pmpro-import-users-from-csv” directory to the “/wp-content/plugins/” directory of your site.
- Activate the plugin through the Plugins’ menu in WordPress.
How it Works
The Import Users From CSV by Ulrich Sossou allows you to create new users and update existing users by importing a simple CSV file.
This Paid Memberships Pro add on extends the functionality of Ulrich Sossou’s plugin, allowing you to automatically assign membership levels to users at import, update subscription information, or migrate and continue existing subscriptions simply by adding a few columns to your CSV file.
CSV Import Template
Download the template below to begin formatting your data for import.
PMPro Import Users From CSV Template (.csv)
Once you’ve got your template set up, just import it like you normally would with Import Users From CSV. Be sure to save the CSV as MS-DOS format.
- Go to Users > Import from CSV in the WordPress dashboard.
- Configure your options. If you would like to update existing users, make sure the “Users update” checkbox is checked.
- Click the Import button.
- If you have existing subscriptions hitting an old IPN or Webhook URL, you may need to use custom code like this to redirect that traffic to the equivalent PMPro URL.
Note: If you have any unused column headers after filling out the template, delete them or your import will fail.
Assigning Membership Levels
The only field required to give a user a membership level is membership_id, but it’s best to fill out as many fields as possible.
The membership level ID can be found on the Memberships > Membership Levels page in the WordPress Dashboard.
Most of this information can also easily be obtained from existing memberships by using the Export to CSV feature in Memberships > Members List in the WordPress Dashboard.
Note: The membership level ID needs to be a numerical value, for example – “3”.
Maintaining Active Subscriptions
If you want to continue or update an existing subscription, you must fill out the membership_subscription_transaction_id and membership_gateway fields.
The Gateway and Subscription Transaction ID can both be found on the Memberships > Orders page under the Gateway and Transaction IDs columns respectively.
If you want to update an existing subscription, you must enter the updated billing details as well.
Please note that if you are migrating from s2member you must redirect the IPN using the instructions in this guide.
Below is an explanation of the column headings and what they mean:
|Column Heading||Field Description|
|membership_id*||Membership Level ID of the user’s membership level. This can be found by going to Memberships > Membership Levels int he WordPress Dashboard.|
|membership_code_id||Discount Code ID (if one was used). This can be found by going to Memberships > Discount Codes in the WordPress Dashboard.|
|membership_initial_payment||The initial payment for the user’s membership level. This is usually set by the Initial Payment section on the Edit Membership Level page.|
|membership_billing_amount||The recurring billing amount for the user’s membership level. This is usually set by the Billing Payment section on the Edit Membership Level page.|
|membership_cycle_number||The number of billing cycles for the user’s membership level. This is usually set by the Billing Payment section on the Edit Membership Level page.|
|membership_cycle_period||The billing cycle period. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes). This is usually set by the Billing Payment section on the Edit Membership Level page.|
|membership_billing_limit||The billing cycle limit for the user’s membership level.|
|membership_trial_amount||The trial amount for the user’s membership level.|
|membership_trial_limit||The number of cycles the trial should last for the user’s membership level.|
|membership_status||The status of the user’s membership. Possible values: active, inactive|
|membership_startdate||The member’s start date. (formatted as YYYY-MM-DD)|
|membership_enddate||The member’s end date. (formatted as YYYY-MM-DD)|
|membership_subscription_transaction_id**||The Subscription Transaction ID. This is required to continue or update an existing subscription and can be found on the Memberships > Orders page in the WordPress Dashboard. It is usually the customer ID created by the payment gateway.|
|membership_gateway**||The Payment Gateway for the user’s recurring subscription. Possible values are “check”, “stripe”, “paypalstandard”, “paypalexpress”, “paypal”(for website payments pro), “payflowpro”, “authorizenet”, and “braintree” (without the quotes).|
|membership_payment_transaction_id||The Payment Transaction ID. This can be found on the Memberships > Orders page in the WordPress Dashboard. This is the transaction ID created by the payment gateway.|
|membership_affiliate_id||The Affiliate ID associated with the user’s order. This is only used if an affiliate tracking system is installed.|
|pmpro_stripe_customerid||(For Stripe customers only) The Customer ID. This is the same as membership_subscription_transaction_id above.|
*required to assign membership levels
**required to update recurring subscription
Billing Information Import
Since Paid Memberships Pro stores users’ billing information in user meta, you can also populate billing information by adding these columns:
|Column Heading||Field Description|
|pmpro_baddress1||Address Line 1|
|pmpro_baddress2||Address Line 2|
|pmpro_bcountry||Country – this should be one of the country codes found in includes/countries.php|
|pmpro_CardType||Card Type – possible values are “Visa”, “Mastercard”, “American Express”, and “Discover” (without the quotes).|
|pmpro_AccountNumber||Card Number – 16 digit card number in the format XXXX-XXXX-XXXX-1234|
|pmpro_ExpirationMonth||Expiration Month – 2 digit expiration month of card(January = 01, February = 02, etc.)|
|pmpro_ExpirationYear||Expiration Year – 4 digit expiration year of card|