Paid Memberships Pro includes three reports in the Memberships > Reports screen of the WordPress admin. These reports highlight Sales and Revenue, Signups and Cancellations, as well as data for Member Visits, Views and Logins.
In this code recipe, we show you how to new blank report you can use as a basis to create your own report widget or report details page. Your custom report, like this one we made to show membership order refund rate, appears like any other built-in report in the Memberships admin area.
Table of contents
The Code Recipe
This code recipe creates the placeholder code for your new custom report widget and report page. You will need additional development to create the actual report contents. Check this post on how to create a refund rate report. You can also see this recipe that shows you how to query active members based on usermeta, which is useful for creating custom member reports.
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.
If you are using a plugin for PMPro Customizations, you can keep things organized by saving your customized report code in a separate .php
file and then require it within the Customizations plugin, like this:
require_once(dirname(__FILE__) . "/reports/pmpro-reports-extras.php");
Screenshot: The Sample Report Widget
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.