# KD Submissions

**Contributors:** keydigital1  
**Tags:** submissions, management, statuses, comments, admin tools  
**Tested up to:** 6.7.2  
**Stable tag:** 2.1.0
**License:** GPLv2 or later  
**License URI:** [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)

An intuitive WordPress plugin for managing submissions created by Elementor Submissions, statuses, comments, and WHMCS analytics sync.

---

## Description

The KD Submissions plugin provides an all-in-one solution for managing and filtering submissions created by Elementor Submissions directly from the WordPress admin panel. It comes with features for efficient submission tracking and status management:

- Assign multiple statuses to each submission.
- Filter submissions by form type, status, and creation date.
- Add, edit, or delete custom statuses.
- Include comments for submissions, displayed as customizable pills for clarity.
- Real-time updates for all actions, ensuring a smooth user experience.
- AJAX-powered operations for dynamic functionality without page reloads.
- Real-time WHMCS sync for submissions and contact clicks with rate limiting and aggregation.
- Daily reconciliation sync so WHMCS metrics stay aligned with WordPress as the source of truth.

---

## Frequently Asked Questions

### How do I add a new status?
You can use the **Status Manager** button to add new custom statuses. The new status will be immediately available for use.

### Can I filter submissions by multiple criteria?
Yes! You can filter submissions by form type, status, and creation date using the dropdowns and checkboxes provided.

### What is the last compatible version of Elementor?
The latest version of Elementor that this plugin is compatible with is **3.13.3**.

---

## Changelog

### 1.0
- Initial release with full-featured submission management.
- Dynamic status and comment management.
- Real-time UI updates using AJAX.
- Advanced filtering by form type, statuses, and creation dates.

### 1.0.1
- Added primary template loading for `/pieteikumi` and `/pieteikumi/add` pages, overriding any theme templates.
- Clear LiteSpeed cache for `/pieteikumi` and `/pieteikumi/add` pages on plugin activation and deactivation.
- Styling changes for improved usability.

### 1.0.2
- Added ability for Editor and Shop Manager roles to access `/pieteikumi` and `/pieteikumi/add` pages.
- Enhanced role-based permissions for improved workflow control.

### 1.0.3
- Wordpress good practices implmenetation

### 1.0.4.
- Added the ability to hide and show specific columns
- Improved UX and UI for editing names of columns

### 1.0.5.
- Changed scripts and styles loading for theme compatabilty

### 1.0.6.
- Resolve mismatched storage engines
- Resolve mismatched table collation
- Resolve mismatched column types

### 1.0.7.
- Add admin bar and admin menu items directing to plugin

### 1.1.0.
- Referral system, which shows the referral source in analytics and submission data
- Ability to add custom form names in settings
- Header and footer components with proper script loading, titles and favicon

### 1.1.1.
- Add a licensing system to analytics page

### 1.2.1.
- Completely remove licensing
- Change which is the default page, related links and buttons. Add redirects to previous links
- Add new submissions page. Display a combined list of all unviewed submissions

### 2.0.1.
- Split and update codebase to increase code quality
- Add integration with ERP system

### 2.0.2.
- Added chunked backfill with persistent cursor
- Added sync watermark
- Added retry queue
- Added shared batched series payload builder for date ranges

### 2.0.3.
- Added dynamic mailto/tel click tracking via REST endpoint
- Added email/phone click metrics to dashboard stats and WHMCS sync payloads
- Replaced conversion-rate card with total contact-clicks card and added contact-clicks pie chart

### 2.0.4.
- Added realtime WHMCS sync hooks for new submissions and contact clicks
- Added 60-second realtime throttle with aggregation so no event counts are lost
- Added daily reconciliation sync window to keep WHMCS totals aligned with WordPress

### 2.1.0.
- Added upgrade bootstrap rule so updates from 2.0.3 or 2.0.4 trigger an immediate one-time WHMCS daily sync.

---

## Upgrade Notice

### 1.0
This is the first release of the KD Submissions plugin.

### 1.0.1
Introduces enhanced page template management and automatic LiteSpeed cache clearing for critical pages. Includes minor styling improvements.

### 1.0.2
Enables Editor and Shop Manager roles to access key pages. Role-based permissions have been expanded for better compatibility.

### 1.0.3
Wordpress good practices implmenetation

### 1.0.4
Added the posibilty to hide columns for easier viewing

### 1.0.5
Fixed theme compatability issues

### 1.0.6
Resolve several mismatches regarding data

### 1.0.7
Add admin bar and admin menu items directing to plugin

### 1.0.8
Added analytics dashboard with charts and statistics, submission date column, and Independent Analytics integration

### 1.1.0
Added referral system, ability to add custom form names

### 1.1.1
Add a licensing system to analytics page

### 1.2.1
Remove licensing, change which is the default page and add new submissions page. Display a combined list of all unviewed submissions

### 2.0.1
Split and update codebase to increase code quality, add integration with ERP system

### 2.0.2
Improve WHMCS submissions sync

### 2.0.3
Add contact click tracking and dashboard visualizations

### 2.0.4
Add realtime WHMCS sync with throttled aggregation and daily reconciliation

### 2.1.0
When updating from 2.0.3 or 2.0.4, the plugin now runs one immediate one-time WHMCS daily sync automatically.
