=== COD Scale Bridge ===
Tags: woocommerce, cash on delivery, order management, fulfillment, analytics
Requires at least: 5.9
Tested up to: 7.1
Stable tag: 1.4.36
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce to COD Scale for COD checkout, order operations, fulfillment, tracking, and finance reconciliation.

== Description ==

COD Scale Bridge connects a WordPress or WooCommerce store to the COD Scale
software service. It provides a configurable cash-on-delivery checkout,
product and order synchronization, WooCommerce order mirroring, fulfillment
status synchronization, courier operations, conversion tracking, and COD
finance reconciliation.

The plugin uses a short, one-time connection code generated in the merchant's
COD Scale store workspace. Store credentials remain server-side and are not
exposed to checkout JavaScript.

Key capabilities include:

* Product and variation synchronization from WooCommerce to COD Scale.
* Configurable product-page, landing-page, and cart COD checkout placement.
* Server-authoritative prices, shipping rates, variants, and order totals.
* Idempotent COD Scale and WooCommerce order creation.
* Two-way operational status synchronization.
* Optional browser tracking configured in the merchant's COD Scale workspace.
* A COD Scale Checkout widget for Elementor when Elementor is active.

Detailed setup documentation is available at
https://codscale.io/en/docs/wordpress-bridge-install.

== External services ==

This plugin requires the COD Scale service at https://app.codscale.io. An
administrator must explicitly connect the site before authenticated service
requests are made.

To provide the connected service, the plugin can send the store identity and
URL, plugin version, product catalog, checkout configuration, orders, customer
contact and delivery details, shopper-selected checkout attachments,
fulfillment status, attribution identifiers, and operational diagnostics to
COD Scale. This data is used for checkout processing, store synchronization,
order operations, fulfillment, tracking, attribution, diagnostics, and finance
reconciliation.

When a merchant enables a supported browser tracking integration, the checkout
may load scripts and send configured events to Meta, TikTok, Google Ads, Google
Analytics, or Snapchat. These integrations are disabled unless configured by
the merchant, and COD Scale's consent setting controls whether browser signals
are sent.

* COD Scale privacy policy: https://codscale.io/en/privacy
* COD Scale terms: https://codscale.io/en/terms
* COD Scale support: https://codscale.io/en/support
* Meta Pixel receives merchant-configured browser events, event identifiers,
  product/order values, attribution identifiers, and browser signals when Meta
  tracking is enabled. Meta Terms: https://www.facebook.com/legal/terms and
  Privacy Policy: https://www.facebook.com/privacy/policy/
* TikTok Pixel receives merchant-configured browser events, event identifiers,
  product/order values, and attribution identifiers when TikTok tracking is
  enabled. TikTok Terms: https://www.tiktok.com/legal/terms-of-service and
  Privacy Policy: https://www.tiktok.com/legal/privacy-policy
* Google Ads and Google Analytics receive merchant-configured browser events,
  conversion identifiers, product/order values, and attribution identifiers
  when the corresponding integration is enabled. Google Terms:
  https://policies.google.com/terms and Privacy Policy:
  https://policies.google.com/privacy
* Snap Pixel receives merchant-configured browser events, event identifiers,
  product/order values, and attribution identifiers when Snapchat tracking is
  enabled. Snap Terms: https://www.snap.com/terms and Privacy Policy:
  https://www.snap.com/privacy/privacy-policy

The merchant is responsible for describing these services in the store's
privacy policy and configuring legally appropriate visitor consent.

== Installation ==

1. Install and activate COD Scale Bridge.
2. Open the store in COD Scale and generate a one-time WordPress connection code.
3. In WordPress, open COD Scale > Bridge Settings.
4. Paste the code and choose Save and verify connection.
5. Synchronize WooCommerce products, then configure checkout and tracking in COD Scale.

WooCommerce is optional for the basic shortcode checkout. Product, variation,
native order, cart, and fulfillment synchronization require WooCommerce.
Elementor is optional.

== Frequently Asked Questions ==

= Do I paste an API key? =

No. Use the short one-time connection code generated by COD Scale. The plugin
redeems it server-side for store-scoped credentials.

= Does the plugin replace WooCommerce checkout automatically? =

No. Product-page and cart-checkout placement are explicit settings. The native
WooCommerce checkout remains available unless the merchant enables the COD
Scale replacement and the connected store passes readiness checks.

= Where are prices and shipping rates calculated? =

COD Scale and WooCommerce remain authoritative. Browser-submitted prices are
not trusted when the order is created.

= Does the plugin track visitors by default? =

No advertising platform is enabled by installing the plugin. Tracking scripts
and events require a merchant-configured integration in COD Scale and respect
the configured consent mode.

= Where can I get support? =

Visit https://codscale.io/en/support.

== Privacy ==

After activation, the plugin adds suggested COD Scale wording to the WordPress
Privacy Policy Guide. Review and adapt that wording for the store's actual
configuration, enabled advertising platforms, and legal obligations.

== Development ==

The human-readable source for the compiled checkout JavaScript and CSS shipped
in `assets/` is included in `source/checkout-runtime/`. From that directory,
run `npm install` and `npm run build`. The build output is written to `dist/`;
the release process copies the generated JavaScript and CSS into the plugin's
`assets/` directory after tests and source-parity checks pass.

== Changelog ==

= 1.4.36 =
* Filters the WordPress status pull to lifecycle states the bridge can project, while preserving internal COD Scale events for other consumers.
* Publishes the previously approved high-contrast commune picker runtime from its canonical source and repairs the parity manifest.

= 1.4.35 =
* Adds duplicate plugin collision protection and function existence guards to prevent fatal redeclaration errors if multiple plugin copies coexist.
* Streamlines checkout commune selection with transparent background and sharp stop-desk courier badge.
* Reduces mobile view padding and optimizes courier logo scaling on small screens.

= 1.4.34 =
* Hardens checkout variation display to ensure seamless image-only selector rendering across all devices.

= 1.4.32 =
* Fixes duplicate variation selectors in checkout by hiding redundant text option groups when image variations are present.
* Upgrades image variation selector to pure visual thumbnail cards without text titles or label clutter.
* Adds responsive square aspect ratio, eager loading, and active state badge for checkout variation images.

= 1.4.31 =
* Upgrades Elementor Checkout widget product selection to a searchable Select2 dropdown with inline search bar.
* Formats WooCommerce and synced COD Scale products with prices, currencies, and IDs in Elementor controls.
* Adds support for searchable COD Scale synced product selection and optional custom numeric ID override.

= 1.4.30 =
* Supports Bearer tokens, clock drift tolerance, and multi-secret HMAC authorization for WordPress Adapter MCP calls.
* Safely synchronizes 'bundle' and 'custom' product types as WooCommerce simple products in MCP product sync.
* Maps 'published' and 'active' product and page statuses to WordPress 'publish' visibility state.
* Automatically upserts existing WordPress pages by slug or landing UUID to prevent duplicates upon publication.
* Auto-persists and exposes the MCP Adapter Signing Secret on store connection pairing.

= 1.4.29 =
* Synchronizes COD Scale customer and delivery corrections into the mapped WooCommerce order.
* Preserves home or pickup shipping mode, shipping fee, and pickup-center identity in WooCommerce order data.

= 1.4.28 =
* Adds a manual, nonce-protected order-status synchronization control to Connection Health.
* Exposes clear product and order synchronization entry points from COD Scale store management.

= 1.4.27 =

* Declared anonymous storefront checkout REST routes as public while retaining server-authoritative cart, idempotency, fraud, and validation controls.
* Switched checkout endpoint discovery to WordPress's canonical REST URL helper.
* Moved static runtime font rules into the bundled stylesheet and removed output buffering from the flagged tracking scripts.

= 1.4.26 =

* Raised the minimum supported WordPress version to 5.9 so the declared compatibility matches the MCP adapter's string helper requirements.

= 1.4.25 =

* Added store-scoped checkout section and customer-field ordering managed in COD Scale.
* Applied the same conversion-safe organisation contract to product, cart, Elementor, and shortcode checkout placements.
* Updated WordPress compatibility metadata and removed an unused translations-directory declaration.

= 1.4.24 =

* Replaced the embedded admin iframe with a native WordPress launcher and secure one-click COD Scale sign-in.
* Registered fallback checkout and tracking behavior through WordPress enqueue APIs instead of emitting inline script tags.
* Hardened JSON form inputs with size limits, unslashing, validation, and recursive sanitization.
* Restricted checkout attachments to the verified, allowlisted, size-bounded file subset before transport.
* Aligned the translation domain with the requested WordPress.org plugin slug and expanded third-party service disclosures.
* Removed the external Google Fonts request and retained privacy-safe system font fallbacks.

= 1.4.23 =

* Added a plugin-specific homepage and a distinct author page.
* Added WordPress.org service, privacy, installation, and support disclosures.
* Added suggested site privacy-policy wording for COD Scale data flows and optional tracking integrations.
* Included human-readable checkout runtime source and reproducible build instructions.
