=== PitDesk Auto Repair CRM - Work Orders & Service History ===
Contributors: rwsss
Tags: crm, auto repair, work orders, automotive, garage
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.5.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Auto repair shop CRM for WordPress: capture leads from a visit form, then manage customers, vehicles, work orders, estimates, invoices, and service history.

== Description ==

PitDesk Auto Repair CRM is a lightweight customer relationship management (CRM) plugin for auto repair shops, garages, and independent mechanics who run their business on WordPress. It turns incoming visit requests into tracked jobs and keeps a full customer and vehicle service history, without the cost or complexity of heavyweight shop-management software.

Customers submit a visit request from a form on your site; your team runs everything else from the WordPress dashboard. PitDesk is self-hosted, fully free forever, and works without WooCommerce. 

= What you can do =

* Capture leads: a builder-friendly visit-request form turns website visitors into leads, with built-in spam protection.
* Manage customers: a searchable customer database with contact details.
* Track vehicles: make, model, year, VIN, license plate, mileage, and more, each linked to a customer.
* Run work orders: move each job through a fixed status workflow, from estimate to closed, with labor and parts line items, tax, and totals.
* Print invoices and estimates: generate a printable or PDF invoice or estimate from any work order, with stable sequential numbering, no WooCommerce required.
* Give customers a portal: a passwordless magic-link login lets each customer view only their own vehicles, service history, current visit status, and invoices, and download their own documents.
* Stay GDPR compliant: WordPress core personal-data export and erasure cover customer, vehicle, and lead data; a shop-configurable retention policy purges old leads and stored IP addresses on a schedule; the visit form records consent with a link to your privacy policy.
* Keep service history: every vehicle keeps a complete, per-vehicle service history you can revisit any time.
* See the shop at a glance: a live dashboard shows open work orders by status, new leads, and customer and vehicle counts.
* Control access: built-in roles for shop owner or manager, front desk, and mechanic.

= Who it is for =

Independent auto repair shops, mechanic shops, garages, mobile mechanics, and automotive service businesses that want a simple, self-hosted CRM and work-order tracker inside WordPress, instead of an expensive subscription to shop-management software.

= Embed the visit form anywhere =

The public visit form adopts your theme or page-builder styling and can be added with a shortcode, the block editor, an Elementor widget, or a Divi module. Staff never work from the front end; all shop work happens in wp-admin.

= Built for WordPress =

* Self-hosted on your own site; your customer and vehicle data stays in your database.
* No monthly subscription, and no WooCommerce required.
* Translation-ready, and ships with Spanish (Mexico), French (Canada), Ukrainian, and Vietnamese.
* Customer identities live in the plugin's own tables, never as WordPress users; the portal uses a short-lived, single-use magic link and its own signed session, so customers never get wp-admin access.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the zip from Plugins > Add New > Upload.
2. Activate the plugin through the Plugins screen. Activation creates the database tables and the custom roles.
3. Open the PitDesk menu in wp-admin to reach the dashboard.
4. Assign your staff the PitDesk roles (owner/manager, front desk, mechanic) on their user profiles.

== Usage ==

Place the visit form on a public page using whichever tool your site is built with:

* Shortcode: add `[wrenchpress_visit_form]` to any page, post, or builder text area.
* Block editor: add the "Visit request form" block.
* Elementor: add the "PitDesk Visit Form" widget.
* Divi: add the "PitDesk Visit Form" module.

To give customers a self-service portal, add the `[wrenchpress_portal]` shortcode to a page. Logged-out visitors see a request form; they enter their email and receive a single-use magic link. Once signed in, a customer sees only their own vehicles, service history, current visit status, and invoices, and can download their own documents. The portal is read-only and never exposes wp-admin.

The day-to-day flow:

1. A customer submits the visit form. It arrives under Leads.
2. Promote the lead to a customer, then add their vehicle.
3. Create a work order and move it through the statuses as the job progresses.
4. Add line items and notes. The vehicle keeps a complete service history you can revisit any time.
5. Issue a printable or PDF invoice or estimate from the work order when you need one.

== Accessibility ==

PitDesk targets WCAG 2.2 Level AA and follows the WordPress accessibility coding standards.

The plugin's admin screens and dialogs are scanned with axe-core on every change, every dialog is opened and operated by keystroke in a real browser, and appointments can be created and rescheduled from the keyboard alone. Because automated tools cannot judge keyboard operation, visible focus, or screen-reader announcements, the plugin was also tested by hand with the Orca screen reader on Firefox. No other screen reader is tested, and no formal third-party audit or certification is claimed.

The public visit form takes its colors and typography from your theme, so it looks like the rest of your site. One consequence is worth stating: front-end text contrast comes from your theme, so meeting AA contrast there is the site owner's responsibility. Regardless of your theme, the plugin guarantees a visible focus ring on every field.

The plugin's own admin screens meet AA, and no state is signaled by color alone: overdue reminders, cancelled appointments, and completed steps all carry a text cue too.

Known WordPress issue: on WordPress 7.0, core's own secondary buttons (for example the Search button on every list table) fall just below AA contrast under five of the nine admin color schemes, including the default "Fresh". This is core's chrome, identical on core screens like Users and Plugins with no plugin involved, and PitDesk will not restyle WordPress to hide it. Selecting the Modern, Blue, Coffee, or Ectoplasm scheme on your profile raises those buttons above the threshold.

== Screenshots ==

1. The shop dashboard: open work orders by status, new leads, and customer and vehicle counts.
2. A work order with labor and parts line items, tax, and totals.
3. A customer record with linked vehicles and full service history.
4. The public visit-request form embedded on a site.

== External services ==

This plugin can optionally use a third-party CAPTCHA service to protect the public visit form from spam and automated abuse. A CAPTCHA is only loaded when a shop administrator selects a provider and enters its keys on the plugin settings screen. No CAPTCHA service is contacted until you enable one. You choose one of the following:

Google reCAPTCHA v3

Used to score visit-form submissions so bots can be rejected. When enabled, the reCAPTCHA script is loaded from google.com on any page that shows the visit form, and on submission the plugin sends the reCAPTCHA token, your site key, and the visitor's IP address to Google's verification endpoint (https://www.google.com/recaptcha/api/siteverify) to obtain a score. Data is sent only when the form is shown or submitted.
Terms: https://policies.google.com/terms
Privacy: https://policies.google.com/privacy
reCAPTCHA terms: https://developers.google.com/recaptcha

Cloudflare Turnstile

An alternative CAPTCHA used for the same purpose. When enabled, the Turnstile widget is loaded from challenges.cloudflare.com on any page that shows the visit form, and on submission the plugin sends the Turnstile token, your site key, and the visitor's IP address to Cloudflare's verification endpoint (https://challenges.cloudflare.com/turnstile/v0/siteverify). Data is sent only when the form is shown or submitted.
Terms: https://www.cloudflare.com/website-terms/
Privacy: https://www.cloudflare.com/privacypolicy/
Turnstile: https://www.cloudflare.com/products/turnstile/

== Frequently Asked Questions ==

= Is this free auto repair shop software? =

Yes. PitDesk Auto Repair CRM is a free, self-hosted WordPress plugin with no monthly fees.

= Is it a good fit for a mechanic shop or garage? =

Yes. It is built for independent auto repair shops, garages, and mechanics who want a simple CRM and work-order tracker inside WordPress.

= Can I manage work orders and estimates? =

Yes. Each job is a work order that moves through statuses, including estimate, with labor and parts line items, tax, and totals.

= Does it track vehicle service history? =

Yes. Every vehicle keeps a full service history of its work orders, viewable from the customer or the vehicle.

= Does it require WooCommerce? =

No. The plugin is fully self-contained. WooCommerce integration is an optional future enhancement.

= Do customers need WordPress accounts? =

No. Customers are stored in the plugin's own tables, separate from WordPress users. Staff are WordPress users with the plugin's roles. The optional customer portal signs customers in with a passwordless magic link and its own session, so they still never become WordPress users or reach wp-admin.

= Can customers see their own history online? =

Yes, if you add the `[wrenchpress_portal]` shortcode to a page. Each customer signs in with a single-use link emailed to them and sees only their own vehicles, service history, current visit, and invoices. Every query is scoped to the signed-in customer, and document downloads are checked against ownership.

= Is it GDPR friendly? =

Yes. It plugs into WordPress core's personal-data export and erasure tools for customer, vehicle, and lead data; erasure anonymizes personal details while keeping the financial records a shop must retain. The plugin registers privacy-policy content describing what it stores and which CAPTCHA providers may receive data, the visit form records consent with a link to your privacy policy, and a shop-configurable retention policy purges old unpromoted leads and strips stored IP addresses on a schedule.

= Can I print or email invoices? =

Yes. You can generate a printable or PDF invoice or estimate from any work order. Documents use stable sequential numbering and are frozen when issued, and no WooCommerce is required.

= Where is my data stored? =

In custom database tables created on activation, not in posts or post meta. Your data stays on your own server.

== Upgrade Notice ==

= 1.5.0 =
Adds the customer portal, GDPR export/erasure and data retention, and a Vietnamese translation. This update adds a database change (a new table for portal sign-in sessions) that applies by itself on the next page load. No existing data is changed or removed.

= 1.4.0 =
Adds printable and PDF invoices and estimates. This update adds a database change for document numbering that applies by itself on the next page load. No existing data is changed or removed.

= 1.3.0 =
Accessibility improvements and translation fixes. No database change and no settings change. Safe to update.

= 1.2.5 =
This update adds a database change: a new engine number column on vehicles. It applies by itself on the next page load. You do not need to reactivate the plugin, and no existing data is changed or removed.

== Changelog ==

= 1.5.0 =
* Add a customer portal: place the `[wrenchpress_portal]` shortcode on a page and customers sign in with a passwordless, single-use magic link, then view only their own vehicles, per-vehicle service history, current visit status, and work orders.
* Let a signed-in customer download their own invoices and estimates; every read and every document download is scoped to the signed-in customer.
* Customers never become WordPress users and never reach wp-admin; the portal uses its own short-lived signed session, separate from WordPress login.
* GDPR: customer, vehicle, and lead personal data is now covered by WordPress core's Export Personal Data and Erase Personal Data tools. Erasure anonymizes personal details while keeping the work-order and invoice records a shop needs to retain.
* GDPR: the plugin registers privacy-policy content describing what personal data it stores, why, and which CAPTCHA providers may receive data when enabled, and the visit form shows a link to your site privacy policy next to the consent checkbox.
* Add a shop-configurable data-retention policy: a daily cleanup deletes old unpromoted leads and strips stored submitter IP and user-agent data after a configurable window (defaults 180 and 30 days). Customers and job history are never auto-deleted; set a window to 0 to turn a cleanup off.
* Link customer names in the Work Orders list to the matching customer record.
* Add a Vietnamese translation, and refresh the Spanish (Mexico), French (Canada), and Ukrainian translations.
* Fix bundled translations not loading: the plugin now registers its own languages directory, so shipped Spanish, French, Ukrainian, and Vietnamese catalogs are applied on a translated site.

= 1.4.0 =
* Generate a printable or PDF invoice or estimate from any work order, self-contained with no WooCommerce dependency.
* Use stable, gap-free sequential numbering, isolated per document type, and freeze a document's contents and currency when it is issued so a reprint always matches the original.
* Refresh the Spanish (Mexico), French (Canada), and Ukrainian translations.

= 1.3.0 =
* Accessibility: the "Show more details" toggle on list-table rows now reports its expanded or collapsed state to screen readers.
* Accessibility: completed a manual keyboard and screen-reader pass (Orca on Firefox) across the admin screens, the public form, and the appointments calendar. See the Accessibility section for what is and is not covered.
* Corrected the translation bug-report link and completed the catalogue headers so translators reach the right place.

= 1.2.5 =
* Find a customer or a vehicle by typing: the customer and vehicle pickers on the appointments calendar, the vehicle form, and the work order form now filter as you type, and can be driven from the keyboard alone.
* Search runs on the server, so a picker can now reach any customer or vehicle in the shop. The previous 500-record limit is gone from every picker.
* Record an engine number on a vehicle, alongside the existing engine description.
* Find a vehicle by VIN, license plate, or engine number, and see which of them matched.
* Choose a vehicle and its owner is filled in for you.
* Fix a vehicle losing its owner when saved: a picker could submit an empty owner once the chosen customer fell outside the list the page had rendered.
* Fix an archived customer's vehicle falling back to the placeholder owner when edited, which could save the vehicle against the wrong owner, or against none at all.
* Fix required-field validation on the vehicle and work order forms, which never actually fired.
* Improve accessibility across the plugin: WCAG 2.2 Level AA remediation on the admin screens and the public visit form, confirmation dialogs that move focus into the dialog and hand it back when they close, appointments that can be created and rescheduled from the keyboard alone, corrected low-contrast colors, and status messages that are announced to screen readers. The manual screen-reader review is still in progress.
* Refresh the Spanish (Mexico), French (Canada), and Ukrainian translations to cover everything above.

= 1.2.0 =
* Add service reminders: set a next-service reminder by date and/or mileage when you close a work order, prefilled from a shop default and easy to confirm, edit, or skip.
* Add a reminders worklist with Overdue, Due soon, All, and History views and live counts.
* Mark reminders handled or dismissed; setting a new reminder for a vehicle supersedes the previous one so each vehicle keeps a single active reminder.
* Add a shop default reminder interval and a miles or kilometers unit setting that applies wherever mileage is shown and entered.
* Refresh the Spanish (Mexico), French (Canada), and Ukrainian translations.

= 1.1.0 =
* Add an Appointments calendar: create, edit, and view appointments tied to a customer and vehicle in month, week, and day views, with drag-to-reschedule and warn-only double-booking notices.
* Schedule an appointment straight from a customer, vehicle, or lead, and return to the lead after creating it.
* Add a "Today's appointments" snapshot to the dashboard.
* Add status filter tabs to the Leads list (New, Promoted, Dismissed, Spam, Archived) with an archive and restore action.
* Add a "Powered by PitDesk" link below the visit form.
* Refresh the Spanish (Mexico), French (Canada), and Ukrainian translation templates.

= 1.0.1 =
* Add Spanish (Mexico), French (Canada), and Ukrainian translations.

= 1.0.0 =
* Initial release: leads and the visit form, customers, vehicles, work orders with line items and totals, per-vehicle service history, the staff dashboard, and role-based access.
