Skip to content

SwftGifts

Gift message and gift wrap for Swft Checkout. Customers add a personalised message and optionally request gift wrapping. Both are preserved through the checkout and written to the WooCommerce order.

  • Adds a Gift Message textarea to the Swft Cart drawer
  • Adds a Gift Wrap toggle with configurable price
  • Passes both through the checkout session as extensions.gifts
  • Adds a gift wrap fee row to the checkout order summary
  • Writes gift data to the WooCommerce order as _swft_ext_gifts
  • Adds an order note for the packing team
  1. Download swft-gifts.zip from swft.co.uk/modules
  2. Install via Plugins → Add New → Upload Plugin
  3. Activate

Go to WooCommerce → Settings → SwftGifts:

SettingOptionDefault
Enable gift messageswft_gifts_message_enabledyes
Enable gift wrapswft_gifts_wrap_enabledyes
Gift wrap priceswft_gifts_wrap_price299 (pence)
Wrap product SKUswft_gifts_wrap_sku
Notification emailswft_gifts_notify_email

If Wrap product SKU is set, SwftGifts adds that product to the WooCommerce order line items when wrap is selected, so it appears in fulfilment and inventory.

SwftGifts adds the following to extensions.gifts in the session:

{
"message": "Happy birthday!",
"wrap": true,
"price": 299
}

Available in the checkout frontend via:

window.SwftCheckout.getExtension('gifts')
// { message: 'Happy birthday!', wrap: true, price: 299 }

After payment, the WooCommerce order receives:

Meta keyValue
_swft_ext_gifts{"message":"Happy birthday!","wrap":true,"price":299}

SwftGifts does not fire custom events beyond the standard Swft Cart events. Listen for swftcart:cart-updated to detect when gift options change.

SwftGifts exposes one filter to modify the extension data before it is sent:

add_filter( 'swft_gifts_extension_data', function( array $data ): array {
// e.g. override price for premium members
if ( wc_memberships_is_user_active_member( get_current_user_id(), 'premium' ) ) {
$data['price'] = 0;
}
return $data;
} );