The Orders admin area of PMPro allows you to track sales, confirm payments, and verify successful membership checkouts. If your site is also capturing the member’s shipping information using the Add Shipping Address to Membership Checkout Add On, this code recipe will add the member’s “Shipping Address” details to the order. It should help to simplify order management for sites that need to send a physical item to their members.
About the Code Recipe
If you didn’t already know, you can add a shipping address to your membership checkout page using the Add Shipping Address to Membership Checkout Add On for Paid Memberships Pro.
The Add On saves the member’s shipping address fields as usermeta and displays this information on the member’s User Profile in the WordPress dashboard. If the following code recipe is added to your membership site (via a plugin for PMPro Customizations), these shipping address fields will also appear in the Orders admin area for that member’s transactions.
If you’re using the Orders admin to manage, verify, and process member shipments, this can speed up the shipping process by removing the need to navigate to the member’s profile to locate their details.
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.
Adding Shipping Address Data to All Orders View
You can use the following two action hooks to include Shipping Address details in the Orders table view and the Orders CSV export:
pmpro_orders_csv_extra_columns
pmpro_order_list_csv_export_header_array
- pmpro_orders_extra_cols_header
- pmpro_orders_extra_cols_body
More Useful Articles
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.