=== Ticket Hawker ===
Contributors: woracious
Tags: event-tickets, ticket-booking, paypal, gutenberg-block, event-management
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell event tickets directly from your WordPress posts and pages with a Gutenberg block, PayPal checkout, and a full admin dashboard.

== Description ==

Ticket Hawker adds event ticket sales to any WordPress site with a single Gutenberg block. Drop the block into a post or page, configure the event details, and start selling. No shortcodes, no page builders, no third-party ticketing platforms taking a cut.

**For event organisers who want control.** Set ticket price, quantity, event dates, venue, and buyer fields directly in the block editor. The ticket form renders on the frontend with a live progress bar showing remaining availability.

**PayPal checkout built in.** Buyers pay through PayPal's checkout flow. The plugin handles order creation, payment capture, webhook verification, and booking confirmation without any external ticketing service.

**Pseudo gateway for testing.** Simulate the full booking flow without touching PayPal. The pseudo gateway creates real bookings with test data so you can verify emails, redirects, and admin pages before going live.

**Custom redirect pages.** Control where buyers land after payment. Set separate pages for success, failure, and cancellation. When disabled, buyers return to the originating event page.

**Email notifications.** Buyer receipt and admin notification emails fire on every completed booking. Customise the From Name and From Email. Send a test email to verify your SMTP configuration before the first real buyer arrives.

**Admin dashboard.** Manage bookings with sortable columns, filters, pagination, bulk delete, and CSV export. Monitor webhook events with the same tools. Import sample data for development and testing.

**Free tier limits.** The free version supports up to 50 tickets per event and 5 lifetime event campaigns. Designed for small events, community gatherings, and workshops.

== Installation ==

1. Upload the `ticket-hawker` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins menu in WordPress.
3. Navigate to Ticket Hawker in the admin sidebar to configure settings.
4. Add the Ticket Hawker Event block to any post or page in the block editor.
5. Configure event details (name, date, venue, ticket price, quantity) in the block settings.
6. Set up PayPal credentials under Ticket Hawker > Payment, or use the pseudo gateway for testing.

== Frequently Asked Questions ==

= Do I need a PayPal account? =

For live payments, yes. You need a PayPal Business account to receive payments. For testing, use the built-in pseudo gateway which simulates the full booking flow without PayPal.

= Can I customise the confirmation email? =

The From Name and From Email fields are configurable under Ticket Hawker > Email. The email template uses your site name and event details. Use the Send Test button to preview the email before going live.

= What happens when I reach the free tier limit? =

The block editor will show an upgrade prompt instead of the event configuration fields when you reach 5 lifetime event campaigns. Existing events and bookings are not affected.

= Does it work with any WordPress theme? =

The ticket block renders as a standard Gutenberg block and inherits your theme's styling. It works with any block-compatible theme.

== Screenshots ==

1. Event ticket block in the Gutenberg editor.
2. Frontend ticket form with progress bar.
3. Bookings admin page with filters and CSV export.
4. Payment settings with PayPal configuration.
5. Email settings with Send Test button.

== External Services ==

This plugin connects to PayPal's REST API to process ticket payments. No data is sent to PayPal until the site administrator enters PayPal API credentials and a buyer initiates a checkout.

The plugin connects to the following PayPal endpoints:

Sandbox: https://api-m.sandbox.paypal.com (testing)
Live: https://api-m.paypal.com (production)

Data sent to PayPal and when:

OAuth2 client credentials (Client ID and Secret) are sent when the plugin requests an access token for API authentication. Order details (ticket price, quantity, currency, return URLs) are sent when a buyer clicks the checkout button and an order is created. Payment capture requests are sent after the buyer approves payment on PayPal. Webhook signature verification requests are sent when PayPal delivers a webhook event to the site.

No buyer personal data (name, email, phone) is sent to PayPal by the plugin. PayPal collects buyer details directly through its own checkout interface.

PayPal User Agreement: https://www.paypal.com/us/legalhub/paypal/useragreement-full
PayPal Privacy Statement: https://www.paypal.com/us/legalhub/paypal/privacy-full

== Changelog ==

= 1.0.0 =
Initial release.
