Offer memberships as a unique and valuable gift option. Whether for friends, family, or colleagues, this Add On lets existing members or new visitors purchase a membership for someone else, including a redeemable gift code.

Once purchased, recipients can easily activate their membership, and gift givers can view and manage codes from their account.

Key features of Gift Membership include:

  • Sell memberships as gift codes, redeemable for specified membership levels.
  • Flexible options for gift duration and expiration.
  • Allow gift givers to personalize their gift with a custom message.
  • Automated email notifications for the gift giver, recipient, and admin.
  • Control and manage all gift codes within your admin dashboard.
Screenshot of the user’s account page displaying a list of purchased gift codes, with statuses indicating which codes have been claimed.

How it Works

The Gift Membership Add On enables users to purchase gift memberships that generate unique gift codes for recipients. Here is an overview of the gift-giving process:

  • Purchasing a Gift Membership: Customers select a membership level configured as a “Gift Level.” After payment is received, a unique gift code is generated for the recipient.
  • Redeeming the Gift Code: Recipients enter the gift code at checkout to claim their gifted membership.
  • Gift Code Management: Gift givers can view available and redeemed codes from their account page.

Note: Gift purchasers do not receive a membership themselves; they simply purchase codes for others to redeem.

Installation

You must have the Paid Memberships Pro plugin installed and activated with a valid license type to use this Add On.

  1. Navigate to Memberships > Add Ons in the WordPress admin.
  2. Locate the Add On and click Install Now.
    • To install this plugin manually, download the .zip file above, then upload the compressed directory via the Plugins > Add New > Upload Plugin screen in the WordPress admin.
  3. Activate the plugin through the Plugins screen in the WordPress admin.

Settings

There are two areas of settings for this Add On:

  • Membership Level Settings to define which levels support gifting.
  • Email Templates to customize the default emails sent by the Add On

Membership Level Settings

To set up gift memberships, configure the following settings:

  1. Create a Gift Level: Navigate to Memberships > Settings > Levels and create a new level to act as the gift level.

Note: It is best to create (or move) your gift levels in a separate Level Group from your main levels.

  1. Set Gift Options: In the Gift Level settings, you’ll see additional options:
    • Gift Level?: Enable this option to make the level a gift.
    • Level to Gift: Choose the membership level the recipient will receive.
    • Allow Gift Emails: Optionally allow customers to send a gift email directly to the recipient.
    • Gift Expiration Period: Define how long the gifted membership lasts once redeemed.

For example, to sell your Premium membership as a gift, set up a new “Gift of Premium” membership level that entitles the recipient to six months of Premium access. The price for your level should be bulk payment that entitles the recipient to a 6 month term. Then, select the Premium level in Level to Gift.

Screenshot of the membership level settings page, showing options to configure a level as a gift membership, set an expiration period, and select the level to gift.
Screenshot of the level settings screen to sell the Platinum level as a gift membership.

Email Template Settings

This Add On offers three new email templates, allowing you to customize gift-related notifications:

  • Gift Recipient: Sent to the recipient if the gift giver enters their email at checkout.
  • Gift Purchased: Confirmation email for the gift giver.
  • Gift Purchased (admin): Notification email for site admins upon gift purchase.

To customize these templates, go to Memberships > Settings > Email Templates and select one of the gift emails to modify. Template variables you can use include:

  • !!pmprogl_giver_display_name!!: The gift giver’s display name.
  • !!pmprogl_gift_message!!: The personalized message from the gift giver.
  • !!pmprogl_gift_code!!: The unique gift code generated for the purchase.
  • !!pmprogl_gift_code_url!!: A URL to the checkout page with the gift code pre-applied.
Screenshot of the Gift Purchased email template, sent to confirm a gift membership purchase and include the generated gift code.
Screenshot of the Gift Purchased email template, sent to confirm a gift membership purchase and include the generated gift code.

Advanced Setup with Custom Code

For advanced customization, you can set up “gift giver” and “gift recipient” level relationships using PHP. Developers can add custom setup code using a plugin or the Code Snippets plugin.

Example PHP Setup Options:

  • $pmprogl_gift_levels: Define gift level settings, such as level ID, initial payment, billing cycle, expiration, and more.
  • $pmprogl_require_gift_code: Specify membership levels that require a discount code at checkout.
$pmprogl_gift_levels = array(
// Add gift giver level settings here
);

$pmprogl_require_gift_code = array(2, 4); // Require code for specific levels

Note: If the $pmprogl_gift_levels array is set up in PHP, it will overwrite the settings defined in the WordPress admin.

Complete Example

Below is a full example of PHP setup for gift memberships. This example details how to define the initial payment, cycle period, and expiration settings.

If using custom code but still want to allow gift email delivery at checkout, follow these steps:

  1. Enable Gift Level for the desired membership.
  2. Check Allow Gift Emails.
  3. Uncheck Gift Level and save.
Option NameOption Description
level_idMembership Level ID of the gift membership level. This can be found by going to Memberships > Membership Levels in the WordPress Dashboard.
initial_paymentThe initial payment for the gift membership level.
billing_amountThe recurring billing amount for the gift membership level.
cycle_numberThe number of billing cycles for the gift membership level.
cycle_periodThe billing cycle period. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes).
billing_limitThe billing cycle limit for the gift membership level.
trial_amountThe trial amount for the gift membership level.
trial_limitThe number of cycles the trial should last for the gift membership level.
expiration_numberThe number of “expiration_period”s before the gift membership level expires.
expiration_periodThe duration of the period used by “expiration_number”. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes).

Screenshots

Screenshot of the checkout page where a user can purchase a gift membership, including fields to enter recipient information for code delivery.
Screenshot of the checkout page where a user can purchase a gift membership, including fields to enter recipient information for code delivery.
Screenshot of the checkout order confirmation page, showing details of the gift membership purchase and generated gift code.
Screenshot of the checkout order confirmation page, showing details of the gift membership purchase and generated gift code.
Screenshot of the user’s account page displaying a list of purchased gift codes, with statuses indicating which codes have been claimed.
Screenshot of the user’s account page displaying a list of purchased gift codes, with statuses indicating which codes have been claimed.
Screenshot of the checkout page where the gift recipient enters their unique gift code to claim the membership.
Screenshot of the checkout page where the gift recipient enters their unique gift code to claim the membership.
Screenshot of the membership level settings page, showing options to configure a level as a gift membership, set an expiration period, and select the level to gift.
Screenshot of the membership level settings page, showing options to configure a level as a gift membership, set an expiration period, and select the level to gift.
Screenshot of the Gift Purchased email template, sent to confirm a gift membership purchase and include the generated gift code.
Screenshot of the Gift Purchased email template, sent to confirm a gift membership purchase and include the generated gift code.
Screenshot of the Gift Purchased email template sent to the admin, confirming a gift membership purchase.
Screenshot of the Gift Purchased email template sent to the admin, confirming a gift membership purchase.
Screenshot of the Gift Recipient email template, sent to notify the gift recipient with a personalized message and a link to claim their membership.
Screenshot of the Gift Recipient email template, sent to notify the gift recipient with a personalized message and a link to claim their membership.

.

Action and Filter Hooks

apply_filters( 'pmprogl_gift_code_settings', array $gift_code_settings );

Customize the gift code settings generated at checkout.

do_action( 'pmprogl_gift_code_purchased', $code_id, $user_id, $morder->id );

Fires when a gift code is purchased, enabling custom actions, such as logging or notifications.

Limitations

  • Single Checkout Limit: Users must complete separate checkouts for each gift code purchase. Bulk purchases of gift codes are not supported.
  • Incompatibility with Proration: If you put your gift level in the same level group as your main levels, you may experience issues when also offering prorated memberships. Put your gift levels in a separate level group to avoid this incompatibility.
  • Membership Exclusions: Purchasers do not receive a membership level. Only the gift recipient when they use the code for membership. This is important because the person giving the gift may already have an active membership that you do not want to overwrite.

This is a Plus Add On.

Plus Add Ons are included in all Plus or higher premium membership plans.