=== CCMS Store Customizer for WooCommerce ===
Contributors: ccmshightech
Tags: woocommerce, checkout fields, quantity, my account, performance
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 2.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Decimal and min/max quantities, checkout field editor, guest registration, login controls, My Account editor and performance cleanup in one plugin.

== Description ==

CCMS Store Customizer replaces a handful of small single-purpose WooCommerce plugins with one lightweight settings panel. Every feature is independent and switched off until you turn it on, so you only load what you use.

**Decimal Quantities** — Let customers order fractional quantities (0.5 kg, 1.25 m, etc.). Set the precision from 0 to 6 decimal places.

**Quantity Rules** — Set a minimum, maximum and step (sold in multiples of) for how much of a product can be bought. Set store-wide defaults and override them per product under Product data → Inventory. Enforced on product pages, the cart and checkout, including the Cart and Checkout blocks.

**Checkout Field Editor** — On the classic checkout, hide fields, make them required or optional, change labels and placeholders, and set the display order. Email and country are protected so checkout keeps working.

**Guest Auto-Registration** — Automatically create a customer account when a guest places an order. The new account is linked to the order so the customer can log in and view their order history.

**Force Login** — Require visitors to log in before browsing the store. Password-reset and login pages remain accessible.

**Login Redirect** — Redirect customers to the My Account page after login instead of the default WooCommerce destination.

**Hide Prices from Guests** — Show a login prompt instead of prices to visitors who are not logged in, and stop them adding products to the cart.

**Thank-You Page Redirect** — Send customers to your own page after a successful order, optionally passing the order ID and key so your page can show order details.

**My Account Menu Editor** — Drag and drop to reorder the My Account sidebar tabs, rename them, toggle their visibility, or add custom links that point anywhere.

**Performance Cleanup** — Optional switches to load WooCommerce CSS and JS only on store pages, disable cart fragments outside cart and checkout, remove WooCommerce dashboard widgets, and hide marketplace suggestions and the Marketing menu.

= Requirements =

* WooCommerce 5.0 or later
* WordPress 5.6 or later
* PHP 7.2 or later

== Installation ==

1. Upload the `ccms-woo-store-customizer` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu.
3. Go to **WooCommerce → CCMS Store Customizer** to configure settings.

== Frequently Asked Questions ==

= Does this plugin work without WooCommerce? =

No. WooCommerce must be installed and active. An admin notice will appear if it is missing.

= Will enabling decimal quantities break my existing products? =

No. Existing whole-number quantities continue to work. The setting only changes the minimum step and stock precision so fractional values are accepted.

= Does guest auto-registration attach an order to an existing account? =

No. If the billing email already belongs to an account, no new account is created and the order stays a guest order. Orders placed by logged-in customers are never moved.

= Does Force Login protect the REST API? =

No. Force Login redirects page and feed requests to the login screen. It does not block the WordPress or WooCommerce REST API, so it is not a way to hide store data from the public.

= What happens to the guest account password? =

A random password is generated. The customer can use the "Lost your password?" link on the My Account page to set their own password.

= Can I revert My Account tab changes? =

Yes. Deactivating the plugin restores the default WooCommerce My Account menu. You can also delete the plugin to remove all saved settings.

= Does the checkout field editor work with the Checkout block? =

No. It applies to the classic (shortcode) checkout. If your checkout page uses the WooCommerce Checkout block, the settings page shows a notice. Quantity rules do work with the Cart and Checkout blocks.

= How do quantity rules work with a step? =

A quantity is valid when it is at least the minimum, at most the maximum, and a multiple of the step. With a step of 6, customers can buy 6, 12, 18 and so on. The minimum and maximum are rounded to a multiple of the step.

= Does hiding prices protect them? =

It hides prices on the page and blocks purchasing for logged-out visitors. It is not a security control: prices remain available to code that reads WooCommerce data directly, such as the REST API.

= Why does the thank-you redirect skip some orders? =

Failed orders are never redirected, and the order key in the URL must match the order. Scripts that run on the default order-received page, such as conversion tracking, will not run on the redirect target unless you add them there.

= Is the performance cleanup safe? =

Every option is off by default and none change orders, prices or stock. If your header shows a live mini cart, leave "Disable cart fragments" off. Enable options one at a time and check your storefront.

== External services ==

This plugin is fully functional without contacting any external service. It connects to one external service, and only when you explicitly choose to use it:

**CCMS newsletter opt-in (optional).** The plugin includes an optional newsletter sign-up on the **WooCommerce → CCMS Store Customizer → About CCMS** tab. Nothing is sent unless a logged-in administrator types an email address, ticks the consent checkbox, and clicks **Subscribe**. When (and only when) that happens, the plugin sends the following to CCMS to record the subscription:

* the email address you entered;
* a consent flag indicating you agreed to receive email;
* a fixed source label (`ccms-woo-store-customizer`); and
* your site's address (the result of `home_url()`), so CCMS can associate the request with your site.

The data is sent to Complete Content Management Services (CCMS) at `https://www.ccmssolutions.com/api/newsletter-subscribe.php`. No data is sent at any other time, and no order, customer, visitor, or store data is ever transmitted.

Service provider: Complete Content Management Services — https://www.ccmssolutions.com/
Terms of service: https://www.ccmssolutions.com/terms/
Privacy policy: https://www.ccmssolutions.com/privacy-policy/

== Changelog ==

= 2.1.0 =
* New: Quantity Rules — minimum, maximum and step per product with store-wide defaults, enforced on product pages, cart, checkout and the Cart/Checkout blocks.
* New: Checkout Field Editor — hide, require, relabel and reorder classic checkout fields.
* New: Hide prices and purchasing from logged-out visitors.
* New: Thank-you page redirect with optional order details.
* New: Performance Cleanup options.
* New: FAQ, Help & Support and About CCMS tabs, with an optional, consent-based newsletter sign-up.
* Refreshed settings screen with a banner header and a single tab bar.
* Store listing images moved out of the plugin package to reduce download size.

= 2.0.0 =
* Complete rewrite for WordPress.org submission.
* Added HPOS compatibility declaration.
* Added full internationalization (i18n) support.
* Replaced external CDN dependencies with WordPress core UI.
* Added uninstall.php for clean removal.
* Security hardening: nonce checks, capability checks, output escaping.

= 1.0.5 =
* Initial public release.

== Upgrade Notice ==

= 2.1.0 =
Adds quantity rules, a checkout field editor, guest price hiding, a thank-you redirect and performance options. All new features are off by default and existing settings are preserved.
