If you want to offer a discount on membership for a temporary timeframe, but still want to remind customers of the full price, this code example for you. Users will see (and pay) the discounted price, but will be reminded of the regular price so they know they are getting a deal.

Banner Image for Run a “Sale” on Your Membership Site and Show the Regular Price with Strikethrough Style Code Recipe

How it Works

  1. For this example, we have a membership level that is regularly $97 but we are offering a temporary discount ($50 savings) on membership.
  2. We’ve updated the membership level price to have an initial payment of $47, then used this code recipe (and the pmpro_level_cost_text filter to show the price as pictured above.
  3. When you are finished offering the discount, just update your membership level price and remove the code recipe from your site.
Discount Level Cost with Strikethrough Style for Discount

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.

Modify the $text returned to filter your specific values.

Need help getting this to work?

The specific example above may not work for the discount you are offering. If you need help customizing this recipe please open a ticket in the member support area and we will help you modify the level’s price display to show your unique promotion.

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