Many membership sites need to collect custom profile fields as part of the checkout process. If your site also leverages Zapier automations to connect third party applications, you may need to include some of the user fields in the data your Zap receives.

This code recipe demonstrates how to use the pmproz_after_checkout_data hook to include custom user profile fields in the data that Paid Memberships Pro sends to Zapier after checkout. This recipe is specifically designed for sites that are using the Zapier Integration Add On, not the built-in Zapier support in core Paid Memberships Pro.

Send User Profile Fields to Zapier After Membership Checkout Code Recipe Banner Image

About the Code Recipe

This tutorial shows you how to send additional fields to Zapier in two steps. You’ll need to install and configure the Zapier Integration Add On to use this method.

First, create the user fields. In this tutorial, we created a fictitious health coaching website where members must add a phone number, current health goals, and dietary restrictions.

After checkout, the code recipe connects that data to Zapier to help the coach set up their new customer in a third-party app.

How to Create User Fields

  1. Navigate to Memberships > Settings > User Fields in the WordPress admin.
  2. Create new fields in  an existing field group, or add fields to a new field group by following this guide.
  3. Create a field for each of the following sample fields for this code recipe in the table below. Note: you’ll want to create your own custom fields that make sense for your membership site. Just be sure to take note of each field’s name so that you can customize the code recipe for your fields.
Sample Field LabelField Name (meta_key)
Phone (for text messages)sms
Nutrition Goalsgoals
Unique Meal Plandiet

Important: You must set the field’s name to match the exact field meta key used in the pmproz_after_checkout_data code recipe. This ensures that your user data is properly sent through your Zap after membership checkout.

Once the fields are created, add the gist below to your site and customize the field names. This final step adds your custom data from checkout to the data sent through your Zap.

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.

Note: This recipe requires the Zapier Integration Add On to be installed and activated.

The code recipe here demonstrates how to add user fields to the array of $data passed to Zapier using the pmproz_after_checkout_data hook. If you are already collecting custom fields at checkout, you only need to adjust the values passed to the array for your unique user meta field keys (field names).

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo