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.
Table of contents
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.
- Navigate to Memberships > Add Ons in the WordPress admin.
- 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.
- 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:
- Create a Gift Level: Navigate to Memberships > Settings > Levels and create a new level to act as the gift level.
- 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.
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.
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
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:
- Enable Gift Level for the desired membership.
- Check Allow Gift Emails.
- Uncheck Gift Level and save.
Option Name | Option Description |
---|---|
level_id | Membership Level ID of the gift membership level. This can be found by going to Memberships > Membership Levels in the WordPress Dashboard. |
initial_payment | The initial payment for the gift membership level. |
billing_amount | The recurring billing amount for the gift membership level. |
cycle_number | The number of billing cycles for the gift membership level. |
cycle_period | The billing cycle period. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes). |
billing_limit | The billing cycle limit for the gift membership level. |
trial_amount | The trial amount for the gift membership level. |
trial_limit | The number of cycles the trial should last for the gift membership level. |
expiration_number | The number of “expiration_period”s before the gift membership level expires. |
expiration_period | The duration of the period used by “expiration_number”. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes). |
Screenshots
.
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.