=== ScopeQuote Cost Calculator ===
Contributors: tomlandrypainting
Tags: cost calculator, quote calculator, price estimator, estimation form, service calculator
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create customizable service estimates, project scopes, printable proposals, optional payments, and booking handoffs in WordPress.

== Description ==

ScopeQuote Cost Calculator gives service businesses a responsive estimating workflow with six starting trade configurations:

* Painting
* Drywall
* Roofing
* HVAC
* Plumbing
* Electrical

Site administrators can adjust each trade's base rate, business details, proposal note, accent color, currency, payment setting, and optional booking URL. Visitors can choose a service, enter quantity and condition, review the labor/material/overhead breakdown, add client details, preview local photos, and print or save a proposal as a PDF.

Each installation can be assigned one trade and locked to it. When locked, shortcode attributes cannot override the assignment and only the assigned trade's configuration is delivered to the browser. On WordPress multisite, the assignment can only be changed by a network super administrator.

WooCommerce integration is optional. When enabled, ScopeQuote recalculates the payment amount from server-side rates, creates a pending WooCommerce order, and sends the customer to WooCommerce's secure order-payment screen. Stripe support comes through Stripe for WooCommerce; ScopeQuote never stores card data or Stripe keys.

When EasyAccurate Universal Booking Calendar is active, customers can request a free estimate from ScopeQuote. Customers who complete a WooCommerce payment can reserve their appointment through the booking link on the order-confirmation page.

= Features =

* Responsive four-step estimator
* Adjustable rates for six service trades
* Optional one-trade assignment enforced on the server
* Multisite-safe assignment control for member sites
* Labor, materials, overhead, total, and estimate range
* Condition multipliers for preparation or repair complexity
* Trade-specific scope checklists
* Client and job detail fields
* Local photo previews with an eight-image limit
* Printable proposal that can be saved as PDF through the browser
* Optional 25%, 30%, 50%, or full WooCommerce payment
* Compatible with Stripe for WooCommerce and other enabled WooCommerce gateways
* Optional EasyAccurate Universal Booking Calendar handoff
* Optional external booking link fallback
* Server-side price validation and checkout rate limiting
* Shortcode attributes for selecting the starting trade
* Optional “Estimator by Easy Accurate” credit, disabled by default and marked nofollow

== Shortcodes ==

Use the primary shortcode:

`[scopequote_calculator]`

Choose a starting trade:

`[scopequote_calculator trade="roofing"]`

Supported trade values are `painting`, `drywall`, `roofing`, `hvac`, `plumbing`, and `electrical`.

When “Lock this estimator to the assigned trade” is enabled, the saved assignment overrides the shortcode's `trade` attribute.

The aliases `[scopequote_cost_calculator]`, `[easy_accurate_scopequote]`, `[scopequote-cost-calculator]`, and `[scopequote-estimator]` remain available for backward compatibility.

== Installation ==

1. Upload the plugin ZIP from Plugins > Add Plugin > Upload Plugin.
2. Activate ScopeQuote Cost Calculator.
3. Open Settings > ScopeQuote Cost Calculator and review the business details and rates.
4. Choose the site's assigned trade and leave the trade lock enabled for a single-trade member estimator.
5. Add `[scopequote_calculator]` to a page, post, or shortcode-compatible block.
6. Optional: activate WooCommerce and Stripe for WooCommerce, then enable WooCommerce checkout in ScopeQuote settings.
7. Optional: activate EasyAccurate Universal Booking Calendar and configure its booking page and working hours.

== Frequently Asked Questions ==

= Does this plugin use artificial intelligence? =

No. ScopeQuote performs transparent calculations from the rates and job details entered on the site. It does not claim to measure or analyze photos.

= Where are customer details saved? =

Until the visitor starts checkout or submits a booking, client details remain in the current browser page. Starting WooCommerce checkout saves the submitted billing and estimate details to a pending WooCommerce order. Submitting a booking saves the appointment through EasyAccurate Universal Booking Calendar.

= Are selected photos uploaded? =

No. The browser creates temporary local previews. ScopeQuote does not send the selected image files to WordPress, WooCommerce, Stripe, or the booking calendar.

= Can I collect payments? =

Yes, optionally. Activate WooCommerce, enable ScopeQuote's WooCommerce checkout setting, and configure an enabled WooCommerce payment gateway. For Stripe, install and connect Stripe for WooCommerce. The gateway—not ScopeQuote—handles card entry and payment processing.

= Is the estimate a binding quote? =

No. The plugin labels the result as a planning estimate and reminds users to verify measurements, conditions, current material prices, taxes, permits, and code requirements.

= Can I change the formula? =

Administrators can change each trade's base rate. The calculation uses quantity multiplied by the base rate and selected condition multiplier. The displayed breakdown is 60% labor, 30% materials, and 10% overhead. The range is 90% to 115% of the calculated total. WooCommerce payment amounts are independently recalculated from the same server-side settings.

= Can each member site be limited to one trade? =

Yes. Choose an assigned trade and enable the lock under Settings > ScopeQuote Cost Calculator. The server ignores shortcode attempts to select another trade. On multisite, only a network super administrator can change this assignment.

= Does the plugin require a backlink? =

No. Administrators may opt in to a small “Estimator by Easy Accurate” credit, but it is disabled by default. Its link uses `rel="nofollow"` and is not intended to pass ranking credit.

== External services ==

ScopeQuote itself does not send payment information to an external service. When the site owner enables WooCommerce checkout and the visitor intentionally starts payment, ScopeQuote creates a WooCommerce order and redirects to WooCommerce's payment screen. Any payment data is handled by the payment gateway enabled by the site owner.

Sites using Stripe for WooCommerce are subject to Stripe's terms and privacy policy:

* Stripe terms: https://stripe.com/legal/consumer
* Stripe privacy policy: https://stripe.com/privacy

== Privacy ==

ScopeQuote does not create user accounts or track usage. Before checkout or booking, client information, job details, field notes, and photo previews stay in the browser. Photo files always remain local to the browser. Optional WooCommerce checkout stores the submitted billing and estimate details in a WooCommerce order. Optional booking integration stores the details submitted to the booking calendar. Site owners are responsible for describing those optional systems in their privacy policy.

== Support ==

Before requesting support, confirm WordPress and PHP meet the listed minimum versions, temporarily test with a default theme, and check the browser console for extension or optimization conflicts. Include the WordPress version, PHP version, active theme, shortcode, assigned trade, and exact steps needed to reproduce the problem. Do not include API keys, passwords, customer details, or private job photos in a support request.

== Changelog ==

= 1.3.0 =

* Added optional WooCommerce checkout for 25%, 30%, 50%, or full payment.
* Added compatibility with Stripe for WooCommerce and other enabled WooCommerce gateways.
* Added server-side payment recalculation, rate limiting, order metadata, and stale-order cancellation.
* Added EasyAccurate Universal Booking Calendar handoff with estimate and customer prefill.
* Added payment and integration status controls to the settings screen.
* Corrected the package directory, main filename, text domain, contributor name, and repository identity for `scopequote-estimator`.

= 1.2.2 =

* Renamed the display identity to ScopeQuote Cost Calculator.
* Added `[scopequote_calculator]` as the primary shortcode while preserving earlier shortcode aliases.
* Fixed the front-end script handle so the calculator loads and functions correctly.
* Added stored-setting validation, keyboard navigation, photo-size validation, and bounded multisite uninstall processing.

= 1.2.1 =

* Added collision-resistant internal identifiers and migrated earlier settings without deleting legacy data.

= 1.2.0 =

* Added the ScopeQuote product identity and primary shortcode.

= 1.1.0 =

* Added enforced one-trade assignment and optional credit.

= 1.0.0 =

* Initial release.
