=== Aviation Company Flight Search & Booking ===
Contributors: beads1234
Tags: flight search, flight booking, aviation, airline, charter flights
Requires at least: 6.5
Tested up to: 7.1
Stable tag: 1.1.0
Requires PHP: 8.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A Gravity Forms-based flight search and booking plugin for aviation, airline, and private charter websites, with optional Go7 AeroCRS integration.

== Description ==

Aviation Company Flight Search & Booking provides a flight-search widget built around Gravity Forms for aviation companies, airlines, and private charter operators; GF-based aviation company flight search and booking widget plugin for Wordpress aviation company websites.  This widget extends Gravity Forms and is suitable for all types of aviation companies, i.e., for regular commercial airlines as well as private charter jets.

Pro Plan Perks:

- Fully customizable features
- Popup calendar with blockable flight date availabilities
- Integrates with 3rd party reservation management systems, i.e., GO7 AeroCRS, and others
- Mobile-friendly design

The plugin can:

* Create flight-search form in Gravity Forms.
* Provide configurable departure and arrival airport choices.
* Provide one-way flight-search functionality.
* Provide round-trip functionality when enabled by the applicable plan.
* Connect eligible configurations to Go7 AeroCRS for flight availability and booking workflows.
* Provide responsive flight-search functionality for desktop and mobile websites.
* Provide WordPress administration settings for airport lists, widget appearance, booking behavior, API credentials, and license/plan information.

The plugin requires Gravity Forms and Themify Popup to be installed and active.

== External Services ==

This plugin communicates with external services to provide flight-search, booking, and licensing functionality; this plugin integrates with GO7 AeroCRS, a third-party airline reservation and booking management service.

The plugin communicates with AeroCRS services to retrieve flight availability, schedules, fares, and booking-related information, as applicable to the features enabled.

Depending on the plugin's configuration and the booking process, information submitted by users may be transmitted to AeroCRS for processing.

Service Provider: GO7 (AeroCRS)
Website: https://go7.io/products/aerocrs/
Privacy Policy: https://www.go7.io/privacy-policy/
Terms of Service: https://docs.aerocrs.com/v4.0/docs/general-terms

Users should review the service provider's policies before using the integration.

=== Go7 AeroCRS ===

When AeroCRS integration is enabled, the plugin sends flight-search information to Go7 AeroCRS to retrieve flight availability and/or booking/deep-link information.

Depending on the workflow, information sent to AeroCRS can include:

* Departure airport code.
* Arrival airport code.
* Departure date.
* Return date, when applicable.
* Number of adult passengers.
* AeroCRS API authentication credentials configured by the site administrator.

Go7 AeroCRS is an external service operated by Go7. Use of AeroCRS is subject to Go7's own terms, policies, availability, and privacy practices.

=== Self Service Solutions License Service ===

The plugin can communicate with the Self Service Solutions internal Wordpress database-based licensing service to validate a plugin license and determine the applicable plan and expiration status.

License validation can send:

* The plugin license number entered by the site administrator.

The Self Service Solutions licensing service is operated internally by Self Service Solutions and is subject to its applicable terms and privacy practices.

Site administrators should review the applicable internal-service terms and privacy documentation and ensure that their site's privacy policy accurately describes these data transfers.

== Requirements ==

* WordPress 6.5 or later.
* PHP 8.3 or later.
* Gravity Forms.
* Themify Popup.
* A Go7 AeroCRS account and API credentials if AeroCRS integration is enabled.
* A valid Self Service Solutions license for features that require a paid plan.

== Installation ==

1. Install and activate Gravity Forms.
2. Install and activate Themify Popup.
3. Upload this plugin to `/wp-content/plugins/`, or install it through the WordPress administration interface.
4. Activate the plugin from **Plugins**.
5. Open **Settings > Aviation Company Flight Search & Booking**.
6. Configure the airport lists, widget options, and booking settings.
7. If AeroCRS integration is being used, enter the required AeroCRS API credentials.
8. If a paid plan is being used, enter the applicable Self Service Solutions license information.
9. Test the complete flight-search workflow before production deployment.

The plugin creates a Gravity Form form used by the flight-search widget. The generated form can be reviewed and configured through Gravity Forms.

== Configuration ==

Configure the plugin from:

**Settings > Aviation Company Flight Search & Booking**

Available settings include:

* Departure airport states and codes.
* Arrival destination airport states and codes.
* Widget appearance and theme options.
* Flight-search informational messaging.
* One-way/round-trip behavior, when available under the applicable plan.
* Manual booking-request handling.
* Go7 AeroCRS PSS automated booking processing and management, when enabled and configured.
* AeroCRS API authentication credentials.
* License and plan information.

=== Airport Lists ===

Airport choices can be configured through the plugin settings using the expected airport-name/code format.

After changing airport lists, verify the corresponding Gravity Forms fields and front-end widget.

=== Site Title ===

For email notifications associated with flight-search form submissions, configure the aviation company's name in **Settings > General > Site Title** if that is the name you want WordPress/Gravity Forms notifications to use as the site name.

== Gravity Forms ==

Gravity Forms is the form-processing layer for the flight-search workflow.

The plugin creates a form and uses its entries when processing flight-search requests.

The plugin validates relevant flight-search values before sending them to external services. Site administrators should also configure Gravity Forms' own retention, notification, and privacy settings as appropriate.

== Go7 AeroCRS Integration ==

When the applicable booking method and plan are enabled, the plugin uses the WordPress HTTP API to communicate with Go7 AeroCRS.

The workflow receives flight-search information from Gravity Forms, validates relevant values, sends the required request to AeroCRS, validates the response, and uses available booking/deep-link information when returned.

AeroCRS integration requires valid credentials supplied by the site administrator.

== Flight-Date Availability ==

The plugin includes a public WordPress AJAX workflow for retrieving available flight dates. Requests use a nonce, input validation, API credential checks, basic rate limiting, response validation, and structured JSON responses.

== Security ==

The plugin uses WordPress security practices including input validation/sanitization, output escaping, AJAX nonce verification, Settings API sanitization, the WordPress HTTP API, response validation, basic rate limiting, and protected administration settings.

Keep WordPress, PHP, Gravity Forms, Themify Popup, and other installed software up to date.

== Privacy ==

The plugin can process flight-search information submitted through Gravity Forms.

When AeroCRS integration is enabled, relevant flight-search information is transmitted to Go7 AeroCRS for availability and/or booking purposes.

When license validation is used, the plugin can transmit the entered license number and site URL to the Self Service Solutions licensing service.

The plugin does not replace the site's own privacy policy. Site administrators are responsible for documenting the site's complete data flows, retention practices, notifications, and third-party services.

The plugin provides privacy-policy guidance for these data flows in the WordPress administration area.

== Licensing and Premium Features ==

The plugin supports Self Service Solutions license and plan information.

Depending on the applicable plan and license status, additional functionality can be enabled, including round-trip flight functionality and AeroCRS PSS booking-management integration.

License validation requires communication with the Self Service Solutions licensing service.

== Troubleshooting ==

= Flight search or availability is not working =

Check that Gravity Forms and Themify Popup are active, airport codes and dates are valid, passenger count is valid, AeroCRS credentials are correct when applicable, and the server permits outbound HTTPS requests. Check WordPress/PHP logs and browser developer tools for errors.

= License validation fails =

Check the license number, outbound HTTPS connectivity, Self Service Solutions service availability, site URL, and firewall/security-plugin rules.

== Frequently Asked Questions ==

= How do I use the plugin? =

After activation and configuration, the plugin creates a Gravity Form form used by the flight-search widget. Configure the widget under **Settings > Aviation Company Flight Search & Booking** and review the generated forms in Gravity Forms.

= Does the plugin support one-way flights? =

Yes.

= Does the plugin support round-trip flights? =

Round-trip functionality is available when enabled by the applicable plan and configuration.

= Does the plugin integrate with AeroCRS? =

Yes. Eligible configurations can connect to Go7 AeroCRS for flight availability and booking workflows.

= Can the plugin be used only as a booking-request or lead-generation form? =

Yes. The plugin includes a manual booking-processing workflow for configurations that do not use an automated CRS/PSS booking system.

= What happens when I uninstall the plugin? =

The plugin removes its stored plugin settings according to its uninstall routine. Gravity Forms data and data managed by other plugins are not automatically removed by this plugin.

== Screenshots ==

1. Flight-search widget with departure and arrival airport selection.
2. Flight-search date and passenger controls.
3. Plugin settings page.
4. AeroCRS booking/integration settings.

== Changelog ==

= 1.1.0 =
* Hardened input validation and sanitization.
* Improved output escaping.
* Added AJAX nonce verification and input validation.
* Added basic rate limiting for anonymous flight-date availability requests.
* Improved AeroCRS HTTP response handling.
* Uses the WordPress HTTP API for external requests.
* Improved license validation and response handling.
* Added modern WordPress plugin dependency metadata.
* Added WordPress Privacy Policy guidance.
* Improved Gravity Forms airport-choice handling.
* Improved date and passenger validation.
* Improved settings registration and sanitization.
* Removed obsolete legacy code and placeholder renewal functionality.
* Removed site-wide disabling of theme automatic updates.
