=== Lean Cart Share and Save for Later for WooCommerce ===
Contributors: azplugins
Tags: woocommerce, save cart, share cart, cart link, cart url
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight cart sharing and saving for WooCommerce - let customers share carts via URLs and save carts for later.

== Description ==

🌐 [Visit Official Website](https://leanplugins.com/wordpress-plugins/cart-share-and-save/?utm_source=wordpress.org&utm_medium=desc) | ⚡ [Upgrade to Pro](https://leanplugins.com/wordpress-plugins/cart-share-and-save/?utm_source=wordpress.org&utm_medium=desc&utm_campaign=upgrade#pricing)

**Try it yourself, no install needed:**

**1. Test Cart Sharing** (no login required)

* [See a pre-loaded shared cart →](https://demo.leanplugins.com/cart-share-and-save/share-cart/lUyyJl6e4Y)
* Works instantly, no need to add products yourself.

**2. Test Cart Saving** (auto login)

* [Auto-login with cart ready →](https://demo.leanplugins.com/cart-share-and-save/share-cart/lUyyJl6e4Y?demo_auto_login=x8Kp2mQr9vLn)
* Click "Save Cart" once logged in to test the save feature.
* Manual login: Username `demo` / Password `demo`

**3. View Saved Carts**

* [My Account → Saved Carts →](https://demo.leanplugins.com/cart-share-and-save/my-account/saved-carts/?demo_auto_login=x8Kp2mQr9vLn)

**4. Test Custom Message** (Pro)

* [See a shared cart with a personal note →](https://demo.leanplugins.com/cart-share-and-save/share-cart/ruMjfZe2GZ)
* Notice the message shown to the recipient above the cart.

**5. Test Password Protection** (Pro)

* [Open a password-protected shared cart →](https://demo.leanplugins.com/cart-share-and-save/share-cart/32FP01OueX)
* Password: `demo`

**Give customers the power to save and share their shopping carts.** Lean Cart Share and Save makes shopping flexible. Anyone can generate shareable cart links in one click, and logged-in users can save unlimited carts with custom names for later purchase.

Share feature works for everyone, including guests. One click creates a unique URL that loads the exact cart anywhere, on any device. Perfect for cross-device shopping, getting approval from others, or sharing product recommendations. Logged-in customers can save carts with custom names (like "Birthday Wishlist" or "Monthly Reorder"), viewable in My Account → Saved Carts where they can restore or delete them anytime.

Lightweight, works with classic themes and modern FSE Cart Blocks, and helps reduce cart abandonment while enabling natural product sharing.

**Real Business Scenarios Where This Plugin Shines:**

* **B2B Sales & Consultations**: Share product quotes and recommendations with clients instantly
* **Gift Shopping & Wishlists**: Let customers create and share wishlists with family and friends
* **Abandoned Cart Recovery**: Customers can save their cart and return later instead of losing their selections
* **Team Purchasing & Approvals**: Enable team members to collaborate on group orders and bulk purchases
* **Cross-Device Shopping**: Let customers start shopping on mobile, save, and complete on desktop
* **Event Planning & Bulk Orders**: Share product lists for weddings, parties, or seasonal restocking
* **Recurring Purchases & Subscriptions**: Create and share weekly/monthly item packages - customers can save these lists to their profile and easily reorder or modify quantities or products

**Key Features:**

* **Cart Sharing**: Generate unique shareable URLs for any cart
* **Cart Saving**: Allow logged-in users to save carts with custom names
* **Custom Message**: Let sharers include a personal note shown to the recipient when the cart loads [PRO]
* **QR Code**: Show a scannable QR code in the share popup so recipients can open the cart on their phone [PRO]
* **Password Protection**: Let sharers set a password recipients must enter before the cart loads [PRO]
* **WooCommerce Integration**: Seamlessly integrates with your existing WooCommerce store
* **FSE & Block Cart Support**: Works perfectly with both classic themes and modern Full Site Editing (FSE) themes with WooCommerce Cart Blocks
* **My Account Integration**: Saved carts appear in customer My Account area
* **Flexible Settings**: Configure share expiry, button label, button position
* **Data Management**: Optional data cleanup on plugin uninstall
* **Security First**: Proper nonce verification and input sanitization
* **Lightweight**: Minimal impact on site performance

**Cart Sharing Features:**
* Generate unique share URLs for any cart
* Configurable expiration (or never expire)
* Custom button label and position
* Product variation support (size, color, etc. preserved on the shared link)
* Quantities preserved exactly as the sharer selected them
* Personal message to recipient [PRO]
* Pre-filled default message text [PRO]
* QR code in share popup [PRO]
* Password-protect share links [PRO]

**Cart Saving Features:**
* Save carts with custom names for later
* View all saved carts in My Account area
* Restore any saved cart with one click
* Delete saved carts when no longer needed
* Perfect for wishlist functionality

== Upgrade to Pro ==

[Get Pro](https://leanplugins.com/wordpress-plugins/cart-share-and-save/?utm_source=wordpress.org&utm_medium=desc&utm_campaign=upgrade#pricing)

**Custom Message** - Allow sharers to write a personal note shown to the recipient when the shared cart loads. Set a default pre-filled message so sharers always have a starting point.

**QR Code** - Display a scannable QR code inside the share popup. Recipients can open the shared cart instantly on any phone camera, no typing required.

**Password Protection** - Let sharers set a password for their cart link. Recipients must enter the correct password before the cart loads, keeping private shares truly private.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/lean-cart-share-and-save` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. **Important**: Make sure WooCommerce is installed and activated first.
4. Go to "Cart Share & Save" in your WordPress admin menu to configure settings.
5. Visit Settings → Permalinks and click "Save Changes" to refresh URL rules (fixes 404 errors).

== Usage ==

**Sharing a Cart:**
1. Add products to your WooCommerce cart
2. Go to the cart page
3. Click the "Share Cart" button
4. Copy the generated URL and share it
5. Recipients can click the URL to load the cart

**Saving a Cart:**
1. Add products to your WooCommerce cart  
2. Go to the cart page
3. Click the "Save Cart" button (requires login)
4. Enter a name for your saved cart
5. Access saved carts from My Account → Saved Carts

**Plugin Settings:**
* Enable/disable cart sharing
* Enable/disable cart saving
* Set share link expiration (days)
* Choose whether to delete data on uninstall

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes, this plugin is built specifically for WooCommerce and requires WooCommerce to be installed and activated.

= Do shared cart links expire? =

By default, shared cart links never expire, but you can configure an expiry (in days) in the plugin settings if you want links to stop working after a set time.

= Can guest users share carts? =

Yes! Any user can share a cart, including guest users who haven't created an account.

= Can guest users save carts? =

No, saving carts requires users to be logged in. However, guest users can still share carts via URLs.

= What happens if a product is no longer available? =

If a shared or saved cart contains products that are no longer available or purchasable, those items are automatically skipped during cart restoration.

= Will this plugin slow down my site? =

No, the plugin is designed to be lightweight and only loads assets when needed. It uses efficient database queries and follows WordPress best practices.

= Does it work with FSE (Full Site Editing) themes and WooCommerce Cart Blocks? =

Yes! The plugin fully supports both classic WooCommerce themes and modern FSE themes using WooCommerce Cart Blocks. The buttons automatically appear in both classic and block cart pages.

= Can I customize the appearance of the share/save buttons? =

The plugin uses standard WooCommerce styling by default. You can customize the appearance using CSS by targeting the `.lean-csns-buttons-wrapper` class.

= Is the plugin translation ready? =

Yes, the plugin is fully translation ready with the text domain 'lean-cart-share-and-save'.

= What data is stored when sharing or saving carts? =

The plugin stores: product IDs, quantities, variations, applied coupons, and basic metadata like creation dates. No personal information is stored with shared carts.

= How do I fix 404 errors on shared links? =

Go to Settings → Permalinks in your WordPress admin and click "Save Changes" (no need to change anything). This refreshes WordPress URL rules.

= Does this plugin use any third-party services? =

Yes. This plugin uses the [Freemius](https://freemius.com/) SDK for licensing, seamless upgrades, and optional insights that help us improve the plugin.

Freemius does not collect any data by default. On activation you will see an opt-in screen where you can choose to share non-sensitive diagnostic data. Opting in helps us understand the environments the plugin runs in, catch compatibility issues early, and prioritize the features that matter most. If you opt in, Freemius collects:

* Site URL, WordPress version, PHP version
* Plugin version and activation/deactivation events
* Your admin name and email address

Skipping the opt-in is completely fine, the plugin works fully either way and no data is sent during normal usage. Purchasing or activating a Pro license connects to Freemius to validate the license and deliver automatic updates.

On opt-in, we also send a copy of the same non-sensitive diagnostic data to our own database hosted on Supabase, so we can track plugin adoption independently of Freemius.

**Service Used:** Freemius (https://freemius.com/)
**Privacy Policy:** https://freemius.com/privacy/
**Terms of Service:** https://freemius.com/terms/

**Service Used:** Supabase (https://supabase.com/)
**Privacy Policy:** https://supabase.com/privacy

== Screenshots ==

1. Share Cart Settings tab - configure sharing options and advanced pro features
2. Save Cart Settings tab - configure save cart options
3. Share Cart and Save Cart buttons on classic WooCommerce cart page
4. Share Cart and Save Cart buttons on FSE theme with WooCommerce Cart Block - works seamlessly with modern block-based cart pages
5. Cart sharing popup with generated shareable URL
6. Cart saving popup with custom name input
7. Saved carts displayed in My Account area

== Changelog ==

= 1.1.4 =
* Fix: Prevent the "Shared cart loaded successfully" notice from showing twice on block (FSE) carts

= 1.1.3 =
* Fix: Plugin version header now matches the release version (1.1.2 shipped with a stale header)

= 1.1.2 =
* New: Choose to combine or replace when opening a share/saved cart link while your cart already has items
* Fix: Share/save prompt pages now render correctly on block (FSE) themes

= 1.1.1 =
* Improved: Cart Share & Save Popup
* Added: Button position option
* Updated: WordPress.org screenshots renumbered serially with updated captions

= 1.1.0 =
* New: Redesigned admin settings page with tabbed UI (General and Advanced tabs)
* Improved: Saved Carts tab in My Account is now hidden when Save Cart feature is disabled

= 1.0.5 =
* New: Added Settings link to plugin action links
* Updated: Language translation file

= 1.0.4 =
* Fixed: Cart restoration does not work.

= 1.0.3 =
* New: Compatibility with FSE (Full Site Editing) themes and WooCommerce Cart Blocks

= 1.0.2 =
* Improved: Enhanced compatibility and performance

= 1.0.1 =
* Improved: Code optimizations and security enhancements

= 1.0.0 =
* Initial release
* Cart sharing with unique URLs
* Cart saving for logged-in users
* WooCommerce integration
* My Account page integration
* Configurable settings page
* Share link expiration options
* Data management options
* Security best practices
