MemberPress vs WooCommerce Part two
In this article, I will present part two of our series on migrating MemberPress to WooCommerce.
If you haven't already, please make sure to read the first part of this series about migrating non-recurring memberships from MemberPress to WooCommerce.
Table of Contents
ToggleRequirements
1 – WooCommerce – Our WordPress based shopping cart solution of choice.
2 – Order Export & Order Import for WooCommerce – This plugin lets you easily import / export data. We highly recommend the pro version for the subscription migration Order Export & Order Import for WooCommerce.
3 – WooCommerce Memberships – WooCommerce based membership plugin.
4 – WooCommerce Subscriptions – WooCommerce based subscription plugin
5 – WooCommerce Subscription importer exporter – WooCommerce subscription importer for the CSV file. Use this if you don’t have the pro version of the
6 – MemberPress – This is the membership plugin you’re migrating from.
Note: For WooCommerce Subscription Importer Exporter you must click on Code => Download Zip
Recreating Your MemberPress Memberships in WooCommerce Memberships
First you'll need recreate your MemberPress products in WooCommerce Memberships as simple products type.
1 – Go to MemberPress -> Memberships
For this tutorial let's use the Bronze Membership in the screenshot above as an example.
2 – Hover over the membership title and then click on edit.
Here you will find all the information regarding the membership:
3 – In a new tab go to WordPress Dashboard -> Products – > Add new product
4 – Repeat this process until you've recreated all the Memberships as Products.
5 – Now you'll need to create the memberships in WooCommerce and link them with the products that you've just created.
To do that, follow the path: WordPress Dashboard -> WooCommerce -> Memberships -> Membership Plans
6 – Click on Add Membership Plan, then add the following items:
- Title
- Slug
- Grant access upon (check the product purchase)
- Products (type the following product that you want to link with, in our example below, bronze).
7 – Click publish and repeat the same process for all your membership plans.
Note: in this tutorial we will not go through ALL of the WooCommerce Memberships settings. If you want to learn more you can see them here:
https://docs.woocommerce.com/document/woocommerce-memberships-plans/
Recreating MemberPress Rules in WooCommerce
You can find the rules in MemberPress -> Rules
1 – To recreate them we need to go back in WooCommerce -> Membership -> Membership Plans -> Edit -> Restrict Content – Add new rule
2 – After you press Add new rule, choose pages from the first dropdown like in the image below. In our case we chose pages, and then type “dash” for dashboard.
3 – Repeat the process for all of the products I know, it is a long process, but this is why we recommend MemberPress.
Configuring the payments methods in WooCommerce
1 – WooCommerce has PayPal payments already integrated inside the plugin. You can see all the other payment integrations in our WooCommerce review.
But for Stripe payments you'll need to install the WooCommerce Stripe Payment Gateway plugin by searching for it in Plugins => Add New.
2 – After you have installed the plugin, follow this path:
WooCommerce -> Settings -> Payments -> Set Up
Setting up PayPal Payments
*Note: to set up the PayPal Payment, you will need a PayPal Business Account.
1 – Here are the most important settings that we need to configure in PayPal.
1.1 – “Enable PayPal Standard”
1.2 – “Enable IPN email notifications”
1.3 – Receiver email
If your main PayPal email differs from the PayPal email entered above, input your main receiver email for your PayPal account here.
This is used to validate IPN requests.
1.4 – PayPal identity token
This is an optional field you can add but it might duplicate your emails if this and the IPN are both enabled.
This is how you can obtain the PayPal identity token:
Optionally enable “Payment Data Transfer” (Profile -> Profile and Settings -> My Selling Tools -> Website Preferences) and then copy your identity token here. This will allow payments to be verified without the need for PayPal IPN.
1.5 – API credentials
– API Username
– API Password
– API Signature
How to get Live API Information:
A) Log in to your PayPal account at PayPal.com.
B) Go to Settings (Gear Icon) > Account Settings > API Access.
C) Select NVP/SOAP API integration (Classic) > Manage API Credentials > Request API Signature.
D) View and copy API Username, API Password, and API Signature.
For additional information please visit https://docs.woocommerce.com/document/paypal-standard/
Configure Stripe Payments
Setting up Stripe in WooCommerce is similar to setting up PayPal, which you've just done.
1 – Enable Stripe in the Payment Gateway settings
1.1 – Live Publishable Key
1.2 – Live Secret Key
Copy the Publishable Key and the live Secret Key in the Stripe Payment WooCommerce from the Stripe Dashboard – Developers -> API Key
1.3 – Webhook Secret
For the Webhook Secret you will have to go into WordPress Dashboard -> WooCommerce -> Settings -> Payments -> Stripe -> click on Set up then copy the webhook endpoint link
1.4 – Add Endpoint
A) After you copied the Webhook Endpoint URL, go to Stripe Dashboard -> Developers -> Webhooks -> Add endpoint
B) Copy the Endpoint URL in the first tab, skip the description and on the Events to send tab, choose all Events, then click on Add endpoint.
C) After you added the endpoint, click on it, go to Signing Secret click to reveal, copy it, and paste it into.
You have successfully set up the Stripe Payment.
For additional information please read their documentation:
https://woocommerce.com/products/stripe/
Export the CSV for Subscription
1 – In order to export the Subscriptions from MemberPress you need to go on WordPress Dashboard => MemberPress => Subscriptions
2 – In order to export the Subscription from Stripe you need to go on Stripe Dashboard => Customers => Subscriptions
Manipulating Data From the MemberPress CSV file alongside the Stripe CSV file
The data that you need from MemberPress for creating the Order CSV is:
1.1 – user_email
1.2 – first_name
1.3 – last_name
1.4 – user_id
1.5 – period
1.6 – period_type
1.7 – Status
1.8 – created_at
The data that you need from Stripe: for creating the Order CSV is:
2.1 – lastCurrent Period Start (UTC)
2.2 – Current Period End (UTC)
Note: The reason why we take the Date from Stripe Subscriptions CSV and not from MemberPress Subscriptions is that the Date from the Stripe will always be the correct one.
Creating the CSV for Subscription
1 – You don’t have to use all columns.
In this context you use the following fields:
1.1 – subscription_id – this should be a really large number so it doesn’t conflict with other post
1.2 – customer_id – This information we get from WordPress Dashboard => Users
1.3 – customer_username
1.4 – customer_email
Both of them will use the email_address that we get from MemberPress file
1.5 – subscription_status – this is typed with the wc- in front of the status. E.g: wc-active
1.6 – start_date – This will take form the MemberPress CSV file
1.7 – next_payment_date
1.8 – last_payment_date
Those date we take from Stripe CSV file
1.9 – billing_period – year, month, week
1.10 – billing_interval – number. E.g “1 month”
1.11 – order_total
1.12 – order_currency
1.13 – payment_method
1.14 – payment_method_title
1.15 – payment_method_post_meta
This is a JSON file: _stripe_customer_id:cus_XXXXXXXXXXX|_stripe_source_id:
1.16 – billing_first_name
1.17 – billing_last_name
1.18 – billing_email
1.19 – order_items
This is a JSON data type, this is how WooCommerce accept this data.
One short example will be:
product_id:XXX|name:Name of the product|quantity:1|total:0.00|meta:|tax:0.00
Here is how the complete file should look like:
You can download the Members CSV sample file here
Exporting Transactions from MemberPress
1 – In order to export the Transactions from MemberPress you need to go on WordPress Dashboard -> MemberPress -> Transactions -> Export Table as CSV
2 – After you export your CSV file, open a blank Google Sheet, and then press CTRL + O on Windows or Command + O on Mac.
The exported CSV with the transactions will look something like this:
Manipulating Data From the MemberPress CSV File
The data that you need from MemberPress for creating the Order CSV is:
– created_at
– user_email
– first_name
– last_name
– user_id
– product_name (This is only for helping us to sort the CSV)
– gateway (Same for here)
– amount
– status (The complete one must be renamed to Completed)
I've highlighted the fields that you will use to make it easier to follow.
Creating the CSV for Orders
1 – You don’t have to use all columns.
In this context you use the following fields:
1.1 – order_id
1.2 – order_number
*Both of these have the same ID.
I don’t recommend leaving them blank as you will need them later when you make the CSV for Members.
1.3 – order_date
*This is the date when the order was made.
Important: Date format must be “YYYY-MM-DD HH:MM:SS” (e.g. 2000-01-20 12:00:00)”
1.4 – status
This is the order status.
This value must match one of the order statuses defined in your shop.
In a default WooCommerce installation this will be one of the following:
- A) Pending
- B) Failed
- C) On hold
- D) Processing
- E) Completed
- F) Refunded
- G) Cancelled
1.5 – order_total
This is the overall order total; if not provided, this can be calculated based on your import settings.
1.6 – order_currency
This is the currency in which the order was placed.
1.7 – payment_method
This should be the payment method name as seen in the Order admin, e.g. “cheque”, but can be any string that identifies the payment method to you.
1.8 – customer_id
1.9 – customer_user
This is the user id that you can find in the MemberPress transaction file under the column heading user_id, or you can find it in the WordPress Dashboard -> Users section.
1.10 – customer_email
The email address of the user.
1.11 – billing_first_name
The billing first name of the user.
1.12 – billing_last_name
The billing last name of the user.
Generally this will be the same as the last name of the user.
1.13 – billing_email
The email address of the users.
1.14 – paid_date
This is the date when the order was made.
Important: Date format must be “YYYY-MM-DD HH:MM:SS” (e.g. 2000-01-20 12:00:00)”
1.15 – products_id
This is a field extra from MemberPress that will help us to sort the products when you have more than 100 rows.
Delete it when you finished adding the data to the CSV
1.16 – line_item_1
This is a JSON data type, this is how WooCommerce accepts this data.
One short example will be:
Where Charge ID: ch_xxxxxxxxxxxxxx can be count in the export file of subscription from Stripe
Here is an example:
content:Order status changed from Pending payment to Processing.|date:2020-11-11 21:43:26|customer:|added_by:system||content:Stripe charge complete (Charge ID: ch_1HmR69CeHh3Fwnk4bXRJvkYq)|date:2020-11-11 21:43:26|customer:|added_by:system
1.17 – line_item_1
This is a JSON data type, this is how WooCommerce accept this data.
One short example will be:
name: Name of the product |product_id: sku:|quantity:1|total:0.00|sub_total:0.00|tax:0.00
You can download the Orders CSV sample file here
2 – Now that the Orders CSV is ready for the import, you can delete the product_ID column.
Important: When you import the orders, the customers are created as well.
Creating the CSV for Members
1 – The CSV for Members doesn’t require that many columns.
1.1 – user_membership_id
1.2 – user_id
Those should always be left blank.
1.3 – user_name
Member user_name can be also found in the transaction file from MemberPress or in WordPress Dashboard -> Users
1.4 – member_first_name
Member First name (optional)
1.5 – member_last_name
Member Last name (optional)
1.6 – member_email
Member Email
1.7 – membership_plan
Membership Name
1.8 – membership_plan_id
The id of the Membership
1.9 – membership_plan_slug
The slug of the Membership
1.10 – product_id
The id of the Product that is linked with the membership
1.11 – membership_status
Select membership statuses if you'd like to export only members who have certain statuses (i.e. only “active” and “complimentary” members).
Leave this blank to export members with any status.
1.12 – order_id
The order_id from the Orders CSV file
1.13 – subscription_id
The subscription_id from the Subscription CSV file
1.14 – member_since
The date when the user registered this information you will find it in WordPress Dashboard -> Users
1.15 – membership_expiration
Since this tutorial is not covering recurring subscriptions, leave this field blank.
2 – This is the complete version of the CSV, all you need to do now is to import them.
All the information I took from the Order file, WooCommerce Membership plans ( ID, name, product ID), and from WordPress Dashboard -> Users
You can download the Members CSV sample file here
3 – Once the CSV file is ready, you need to go in WordPress Dashboard -> WooCommerce -> Memberships -> Import/export
Important: Depending on how many rows you have this might take a while.
4 – After the import is done, you can begin your testing.
If everything is working correctly you can deactivate the MemberPress plugin.
5 – I highly, highly recommend you do all of your testing on a separate staging application.
We use CloudWays hosting because among other things, it give us awesome 1-click staging functionality with a pay-as-you-go model that makes it great for testing.