=== ShowLove Donations ===
Contributors: designbyroger
Tags: WooCommerce Donation, donations, charity, fundraising, woocommerce
Requires PHP: 7.4
Requires at least: 6.3
Tested up to: 7.1
WC tested up to: 9.2.3
Requires Plugins: woocommerce
Stable tag: 1.0.6
License: GPL-2.0-or-later

Accept donations through WooCommerce with a simple, flexible donation form.

== Description ==

ShowLove Donations adds a donation form to your WooCommerce site and optionally a Donation Leaderboard. Visitors can choose their own donation amount and optionally leave a message with the donation.

= How it works =

On activation, ShowLove creates a virtual WooCommerce product to track donations. Use the `[sld_donation]` shortcode to display the donation form on any page or post.

If you prefer, you can create your own donation product to override the ShowLove default product (simple, virtual) and select it in ShowLove -> General Settings -> Select Donation Product.

= Multiple campaigns =

To run separate campaigns (e.g. "Support Education", "Wildlife Fund"):

1. Create a simple, virtual product for each campaign
2. Check "Donation Product" on the product's edit page - this replaces "Add to Cart" with a donation form
3. Either link to the product page directly, or use `[sld_donation product_id="123"]` to embed that campaign's form anywhere

= Donor leaderboard =

Display your top donors with `[sld_leaderboard]`. Donors can choose to remain anonymous at checkout.

= Shortcodes =

**Donation Form:**
`[sld_donation]`
`[sld_donation product_id="123"]`

**Donation Leaderboard:**
`[sld_leaderboard]` - Shows top 10 donors by total
`[sld_leaderboard limit="5"]` - Limit number shown (1-100)
`[sld_leaderboard orderby="date"]` - Sort by most recent instead of highest
`[sld_leaderboard style="2"]` - Use bordered style
`[sld_leaderboard limit="5" orderby="total" style="2"]` - Combined options

= Template Code =
`<?php echo do_shortcode('[sld_donation]'); ?>`
`<?php echo do_shortcode('[sld_leaderboard limit="10"]'); ?>`

== Installation ==

There are two ways to add ShowLove Donations to your WordPress installation.

= Method 1 =
Typical WordPress plugin installation.

1. Download ShowLove zip from DesignbyRoger.com.
2. Go to WordPress Plugins -> Add Plugin -> Upload Plugin
3. Once uploaded, activate ShowLove Donations.
4. Configure Settings. WordPress WooCommerce -> Donation

= Method 2 =
Manual upload.

1. Download ShowLove zip from DesignbyRoger.com.
2. Unzip and upload the entire showlove-donations folder to the /wp-content/plugins/ directory.
3. In WP-Admin -> Plugins, activate ShowLove Donations.
4. Configure Settings. WordPress WooCommerce -> Donation

== Changelog ==

= 1.0.6 =
* Updated description and installation documentation
* Renamed tabs: General Settings, Shortcodes
* Removed video links
* Renamed Gutenberg block to ShowLove Donations

= 1.0.5 =
* Added self-hosted update support via Plugin Update Checker 5.6
* Added Update URI header so updates are served from designbyroger.com

= 1.0.4 =
* Renamed leftover vendor-prefixed CSS class, helper functions and script names to the sld prefix
* Removed a dead nav tab icon style
* No functional changes

= 1.0.3 =
* Leaderboard rows now stay on a single line and scale down in narrow containers
* Donation amount now matches the row font size, bold only
* Leaderboard dates now use a short 3-letter month format (e.g. 5 Mar 2026)
* Added a configurable leaderboard heading, set under Label settings
* Added leaderboard shortcode documentation to the Shortcode settings tab

= 1.0.2 =
* Removed leftover "Get Pro Version" markup from the settings page (crown icon, upgrade feature list)
* Fixed invalid HTML nesting on the settings page
* Removed dead upgrade-button and stale admin-slug CSS rules
* Fixed empty nonce field on the General Settings tab

= 1.0.1 =
* Fixed leaderboard CSS
* Updated settings page title
* Removed "Get Pro Version" tab
* Added support for legacy order flags in leaderboard

= 1.0.0 =
* Initial release
* Forked and rebranded with security improvements
* Added donation leaderboard shortcode
* Added donor privacy controls at checkout
* Removed external update checker (phone-home)
* Fixed SQL injection vulnerabilities
* Added nonce verification to AJAX handlers
* Sanitized all user inputs

