This plugin requires WooCommerce Subscriptions (purchased separately) to function.
Installation
↑ Back to top- Download the .zip file from your WooCommerce account.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
- Install Now and Activate the extension.
Requirements
↑ Back to top- WooCommerce 3.0 or newer.
- WordPress 4.6 or newer.
- PHP 5.2 or newer.
- WooCommerce Subscriptions 2.2 or newer.
Translations
↑ Back to topwoocommerce-subscriptions-gifting
You can view more guidelines on translating extensions here.
Setup and Configuration
↑ Back to top This guide will assume you’ve already configured WooCommerce Subscriptions.
There is no set up or configuration required to get started with Gifting for WooCommerce Subscriptions.
To customise the way Gifting works:
- Go to: WooCommerce > Settings > Subscriptions.
- Scroll down to Gifting Subscriptions.
- Enter text into the Gifting Checkbox Text field. This label text displayed next to the checkbox on the Single Product, Cart and Checkout pages. By default, the text will display “This is a gift”, but you may change this to a phrase which suits your store.
- Optional: click the checkbox next to Downloadable Products to allow download permissions for downloadable subscription purchases to be provided to both the purchaser and recipient. Learn more about this setting in the Downloadable Products section.
- Click Save changes.
Usage
↑ Back to topPurchasing a gift
↑ Back to top- the single product page,
- the cart page, and
- the checkout page.
The single product page
To purchase a subscription for another customer via a product page, the customer can:- Go to a subscription product’s Single Product Page.
- Click the checkbox This is a gift.
- Enter the recipient’s email address.
- Click Sign Up Now.
The cart page
To gift a subscription via the cart page, the customer can:- Add a subscription product to the cart.
- Go to the Cart page.
- Click the checkbox This is a gift.
- Type in the recipient’s email address.
- Click Update Cart.
The checkout page
To gift a subscription via the checkout, the customer can:- Add a subscription product to the cart.
- Go to the Checkout page
- Click the checkbox This is a gift
- Type in the recipient’s email address
- Once the checkout form is complete, click Place Order
Recipient account creation
↑ Back to topView Subscription page
↑ Back to topCompleting an order with a subscription gift
↑ Back to topStore Manager’s View
↑ Back to topProcessing orders with gift recipients
When an order containing a gifted subscription product is created, the gift recipient email is stored alongside their order line items. When processing orders, this allows store managers to see which line items in an order are being purchased for a recipient.Note: If the recipient is subsequently deleted, in addition to the behavior already discussed here, the original order and renewal orders will maintain this information once the recipient is deleted, however, future renewal orders will no longer hold this information.
Add or modify the recipient
Store managers can add and edit a subscription’s recipient from the Edit Subscription administration screen. If the recipient does not already have an account with your WordPress site, you should add the user via the Users > Add New administration screen before proceeding. To manually add a recipient to a subscription:- Click the Recipient select box.
- Type the first few letters of the name or email for the user.
- Click the recipient, after a matching account is loaded.
- Click Save Subscription.
- Click the pencil icon next to Shipping Details.
- Fill in each shipping address field, entering the recipient’s details.
- Click Save Subscription.
Note: Clicking the Load Shipping Details tool will load the purchaser’s shipping details.
Shipping address
↑ Back to topEmail notifications
↑ Back to top- New Recipient Account email: Sent to a recipient when an account is created for them. This email is sent instead of the WooCommerce Customer New Account email for accounts created for gifted subscription recipients.
- New Initial Order – Recipient: Sent to recipients when an order has been placed which contains subscriptions purchased for them. The email contains the purchaser’s name, email and subscription information including the line items included.
- Processing Renewal Order email: Sent to a recipient when payment has been processed for a subscription now awaiting fulfillment for that billing period.
- Completed Renewal Order email: Sent to a recipient when the subscription renewal order is marked complete, indicating that an item for the renewal period has been shipped.
Shared Subscription Management
↑ Back to topAction | Recipient | Purchaser |
---|---|---|
View Subscription | ✓ | ✓ |
Suspend Subscription | ✓ | ✓ |
Reactivate Subscription | ✓ | ✓ |
Cancel Subscription | ✓ | ✓ |
Resubscribe | ✕ | ✓ |
Change Shipping Address | ✓ | ✓ |
Change Payment Method | ✕ | ✓ |
Manually Renew | ✓ | ✓ |
Switch (upgrade/downgrade) | ✕ | ✓ |
View Parent Orders | ✕ | ✓ |
View Renewal Orders | ✕ | ✓ |
WooCommerce Memberships Integration
↑ Back to topDownloadable Products
↑ Back to top- Go to the WooCommerce > Settings administration screen
- Click the Subscriptions tab
- Scroll down to the Gifting Subscriptions section
- Click Downloadable Products to enable or disable dual permissions
FAQs
↑ Back to topWhat happens if I delete a recipient’s account in WordPress?
↑ Back to topHow do I restrict the gift field to specific products?
↑ Back to top'wcsg_is_giftable_product'
filter.
The following code snippet is an example of how to restrict the gifting option to just a few products by their ID.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plugin Name: WooCommerce Subscriptions Restrict Gifting to Products | |
* Description: Restrict the option to gift to specific products. | |
* Author: James Allan | |
* Version: 1.0 | |
* License: GPL v2 | |
*/ | |
function wcsrgp_is_giftable_product( $is_giftable, $product ) { | |
$giftable_product_ids = array( 24, 12859, 11418 ); | |
return in_array( $product->get_id() , $giftable_product_ids ); | |
} | |
add_filter( 'wcsg_is_giftable_product', 'wcsrgp_is_giftable_product', 10, 2 ); |