=== Ape Donate ===
Contributors: codeapeinfo, chadni54
Tags: donation, fundraising, charity, stripe, campaigns
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A feature-rich donation management plugin with AJAX forms, multilingual support, and seamless WordPress integration.

== Description ==

Ape Donate helps charities, nonprofits, and fundraising organizations accept donations on WordPress. Donors can give without a page reload, payments are processed through Stripe Checkout, and you manage campaigns, donors, and receipts from a dedicated admin dashboard.

**Donation forms**

* AJAX-based forms so donors can complete a gift without reloading the page
* Three form templates: Classic, Standard, and Premium
* Logged-in users have their details auto-filled
* Optional anonymous donations, Gift Aid, and a service-fee option
* Google reCAPTCHA (visible or invisible) to reduce spam

**Campaigns and receipts**

* Create and manage fundraising campaigns from the admin dashboard
* Campaign list shortcode with pagination
* Success and failed receipt pages are created on activation
* PDF receipt download for completed donations

**Payments and admin**

* Stripe Checkout with test and live modes, plus webhook support
* Multiple currencies with formatted amounts
* Dashboard, donation list, donors, transactions, and reports
* Color and font settings so forms match your site
* Translation-ready with the `ape-donate` text domain

**Optional add-ons**

Gift Aid and Recurring Donations are **separate WordPress plugins**. Install and activate them from the WordPress **Plugins** screen. **Ape Donate → Add-ons** shows which companion plugins are active:

* **Gift Aid** – Claim Gift Aid on eligible UK donations
* **Recurring Donations** – Accept monthly and other recurring gifts through Stripe

== Installation ==

1. Upload the `ape-donate` folder to the `/wp-content/plugins/` directory, or install the plugin from the WordPress Plugins screen.
2. Activate **Ape Donate** through the Plugins menu.
3. Go to **Ape Donate > Settings** and add your Stripe test or live API keys.
4. (Optional) Enable Google reCAPTCHA and choose a default form template.
5. Add a donation form shortcode to any page or post.

On activation the plugin creates **Donation Success** and **Donation Failed** pages with the receipt shortcodes already in place.

== Shortcodes ==

Place these shortcodes in any page, post, or widget.

= Donation form =

`[apedo_Quick_donation_form]`

Optional attribute:

* `template` – `classic`, `standard`, or `premium`

Examples:

`[apedo_Quick_donation_form]`
`[apedo_Quick_donation_form template="standard"]`
`[apedo_Quick_donation_form template="premium"]`

= Campaigns =

`[apedo_campaign_lists]` – List of active campaigns

`[apedo_campaign id="5"]` – Single campaign by campaign ID

`[apedo_campaign post_id="10"]` – Single campaign by WordPress post ID

= Donation history =

`[apedo_donation_table]`

Logged-in donors see their donation history. Guests are prompted to log in.

= Receipts =

Receipt pages are created automatically. You can also use:

`[apedo_thank_you]` – Success receipt (`id` or `donation_id` query argument)

`[apedo_failed_receipt]` – Failed payment receipt (`id` or `donation_id` query argument)

`[apedo_failed_reciept]` – Alias of `[apedo_failed_receipt]` (kept for existing pages)

== Frequently Asked Questions ==

= How do I display a donation form? =

Add `[apedo_Quick_donation_form]` to any page or post. After activation, open **Ape Donate > Settings** and enter your Stripe API keys so payments can be processed.

= How do I create a campaign? =

Go to **Ape Donate** in the WordPress admin and open Campaigns. Each campaign is stored as a custom post type (`apedo_campaign`). Use `[apedo_campaign_lists]` or `[apedo_campaign]` to show campaigns on the front end.

= Which payment methods are supported? =

Stripe Checkout is included. Recurring donations require the Recurring Donations addon.

= Does the plugin support Gift Aid? =

UK Gift Aid is available through the separate Gift Aid add-on plugin. Install and activate that plugin from **Plugins → Add New**, then turn Gift Aid on in **Ape Donate → Settings**.

= Can donors view their history? =

Yes. Place `[apedo_donation_table]` on a page. Donors must be logged in to see their donations.

= How do I protect the form from spam? =

Open **Ape Donate > Settings > reCAPTCHA**, add your site and secret keys, and choose visible (v2) or invisible (v3) mode.

= Can I change the look of the form? =

Yes. Choose Classic, Standard, or Premium as the default template, or pass `template` on the shortcode. Premium is a free form design included with the plugin, not a paid upgrade. Colors and fonts can be set in Settings. You can also add custom CSS.

= Is the plugin translation-ready? =

Yes. The text domain is `ape-donate`. Translate it with any standard WordPress translation tool.

= Is this plugin compatible with my theme? =

Ape Donate is built to work with standard WordPress themes and does not replace your theme templates.

== Developer Notes ==

JavaScript source lives in `resources/vue/` and `resources/js/`. Compiled assets are written to `assets/` with Laravel Mix.

The plugin ZIP includes the build tools at the plugin root:

* `package.json` — npm dependencies and scripts
* `package-lock.json` — lockfile for `npm ci`
* `webpack.mix.js` — Laravel Mix / Webpack configuration

To rebuild production assets from the plugin directory:

`npm ci`

`npm run production`

Behind a reverse proxy that overwrites client IPs, define `APEDO_TRUST_FORWARDED_FOR` as true in `wp-config.php` so donation rate limiting can use `X-Forwarded-For`. By default only `REMOTE_ADDR` is used.

The admin dashboard bundle (`assets/js/admin.js`) includes Vue 3, Element Plus, and ECharts. Those libraries are used only in wp-admin. Public donation forms use separate, smaller frontend assets.

== External Services ==

This plugin connects to third-party services when those features are used.

**Stripe**

* Purpose: Process donations through Stripe Checkout and verify payments with webhooks.
* Data sent: Amount, currency, donation ID, and payment metadata. Card details are entered on Stripe-hosted Checkout and are not stored by this plugin.
* When: When a donor submits a payment, and when Stripe sends webhook events.
* Terms of Service: [https://stripe.com/legal](https://stripe.com/legal)
* Privacy Policy: [https://stripe.com/privacy](https://stripe.com/privacy)

**Google reCAPTCHA** (optional)

* Purpose: Reduce spam on donation forms.
* Data sent: Form interaction data used by Google to score or challenge the submission.
* When: Only if reCAPTCHA is enabled in Settings and a donor loads or submits a form.
* Terms of Service: [https://policies.google.com/terms](https://policies.google.com/terms)
* Privacy Policy: [https://policies.google.com/privacy](https://policies.google.com/privacy)

All requests to these services use HTTPS.

== Privacy ==

* Card numbers are collected and processed by Stripe, not stored in WordPress.
* Donor name, email, phone, address, amount, campaign, donation message, and transaction status are stored in your WordPress database so you can manage donations and receipts.
* The plugin registers with WordPress **Tools → Export Personal Data** and **Tools → Erase Personal Data**. Erasure removes personal donor details and retains donation amounts and payment status for accounting.
* Donation records stay in the database after the plugin is deleted unless **Remove all data on uninstall** is enabled in Settings.
* Donation Success and Donation Failed pages are not deleted, so any customizations you made stay on the site.
* Google reCAPTCHA runs only when you enable it.
* Gift Aid and recurring billing run only when the matching addon is installed and activated.

== Changelog ==

= 1.0.2 =
* Recurring Checkout and Gift Aid processing live in their companion plugins; this plugin stays fully functional for one-off donations.
* Front-end CSS and JS are loaded with WordPress enqueue APIs.
* Request data is sanitized when it is received, and the admin menu no longer sits among core items.

= 1.0.0 =
* Initial release.
* AJAX donation forms with Classic, Standard, and Premium templates.
* Stripe Checkout with test/live modes and webhook support.
* Campaign custom post type, campaign list, and campaign detail shortcodes.
* Donation history table, success/failed receipts, and PDF receipt download.
* Optional Google reCAPTCHA (v2 visible and v3 invisible).
* Admin dashboard for donations, donors, transactions, reports, and settings.
* Optional add-on detection for Gift Aid and Recurring Donations (separate plugins).
* WordPress personal-data exporter and eraser for donor records.

== Upgrade Notice ==

= 1.0.2 =
Guideline and enqueue updates for the WordPress.org review. One-off donations are unchanged.

= 1.0.0 =
First public release of Ape Donate. Configure Stripe in Ape Donate > Settings after activation.
