=== ShipEdit ===
Contributors: cnrcodetech
Tags: woocommerce, shipping, address change, order cancel, post-purchase
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 0.1.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 8.0
WC tested up to: 11.2

Let customers change their shipping address or cancel unfulfilled orders within your ShipEdit edit window.

== Description ==

ShipEdit is a thin WooCommerce connector plugin. It shows change-address and cancel actions on your storefront after checkout, and talks to the ShipEdit cloud service for eligibility and updates. Edit windows, destination rules, billing, and activity live in ShipEdit, not inside WordPress.

Customer surfaces:

* Order received (thank-you) page
* My Account > View order

Actions only appear when the order is still editable under your ShipEdit rules (typically unfulfilled or on hold, within the edit window, and on an entitled plan).

You configure an API base URL and WooCommerce integration key from your ShipEdit company admin, and you also connect the store with a WooCommerce REST API key so ShipEdit can read and update orders.

= External services =

This plugin connects to ShipEdit, a hosted service run by CNR Consulting Services, Inc. Nothing is sent until you enter an API base URL and integration key on the WooCommerce > ShipEdit settings screen.

What is sent and when:

* Order received and My Account view-order pages (only when API settings are saved): the customer's browser loads ShipEdit assets from this plugin and calls your configured API base URL (`/api/woo/order`, `/api/woo/order/address`, `/api/woo/order/cancel`) with the order id, order key, and integration key to check eligibility and submit address changes or cancellations.
* Admin settings screen: settings stay in WordPress options until you save them. No outbound call is made from the settings page itself.
* Order sync / updates: ShipEdit reads and updates order data through the WooCommerce REST API key and webhooks you authorize from ShipEdit company admin.

ShipEdit privacy policy: https://shipeditapp.com/privacy

The plugin itself is free and GPL-licensed and does not license-gate features. Paid ShipEdit plans are billed by the service, not inside WordPress. Support: support@shipeditapp.com.

== Installation ==

1. Upload the plugin zip via Plugins > Add New > Upload Plugin, or install from the WordPress.org plugin directory when available.
2. Activate the plugin through the Plugins screen. WooCommerce must be active.
3. In ShipEdit company admin, create or open your company, subscribe if needed, then connect WooCommerce with a REST API key (Read/Write).
4. Open WooCommerce > ShipEdit in WordPress.
5. Paste the API base URL and integration key from ShipEdit.
6. Place a test unfulfilled order and confirm change-address / cancel appear on the thank-you page and My Account view-order.

== Frequently Asked Questions ==

= Does this plugin bill me inside WordPress? =

No. The connector is free. ShipEdit cloud billing (if you use a paid plan) is handled outside this plugin.

= Where do customers change their address? =

On the order received (thank-you) page and under My Account > View order, when the order is still within your ShipEdit edit window and rules.

= What data is sent to ShipEdit? =

Configured stores send eligibility and update requests from the customer's browser to your API base URL, including order id, order key, and the integration key. ShipEdit also uses the WooCommerce REST API connection you authorize from company admin to read and update orders. See https://shipeditapp.com/privacy.

= Do I need a ShipEdit account? =

Yes. Create a company in ShipEdit, connect the store, then paste the API base URL and integration key into WooCommerce > ShipEdit.

= Does it work with block themes / order confirmation blocks? =

Yes. The plugin injects after the WooCommerce order-confirmation-summary block when the classic thank-you hook is missing, and declares compatibility with WooCommerce custom order tables and cart/checkout blocks.

== Changelog ==

= 0.1.8 =
* Security: thank-you and My Account panels render only for visitors with the order key, order ownership, or the view_order capability, so order keys are not exposed (including block-theme order-received URLs without ?key=). Guest email fallback fixed for WooCommerce 8.0 to 8.3.
* Cancel panel reports the refund outcome (refund issued, or the store will process it).
* Address changes show the Worker message when ShipEdit blocks them (different shipping zone, PO Box, edit window closed, store auth failure, and similar). Clearer ZIP and state/province validation messages. Storefront errors always show a plain customer sentence (not a raw error code).
* Shop managers can save WooCommerce > ShipEdit settings (options.php capability filter).
* Plugin settings are deleted on uninstall.
* Storefront copy: fixed 0 and 1 minute edit window wording, panel hidden when billing has lapsed, refresh note after an address update.
* Settings page clarifies that the integration key is a store identifier, not a secret.
* Storefront disables save and cancel while a request is in flight; ignores a busy (409) response after a success. Settings page shows the saved notice under WooCommerce > ShipEdit.

= 0.1.7 =
* Set WordPress.org display name and slug to ShipEdit / shipedit.

= 0.1.6 =
* Set Author to CNR Consulting Services, Inc. Plugin URI https://shipeditapp.com; Author URI https://cnrcode.com (WordPress.org ownership clarity).
* Expand WordPress.org readme (external services, FAQ, tags, tested-up-to).
* Declare WooCommerce HPOS and cart/checkout blocks compatibility.
* Align Text Domain to `shipedit`.

= 0.1.5 =
* Prior connector release (thank-you / My Account panels, settings, block confirmation inject).

== Upgrade Notice ==

= 0.1.8 =
Security fix: the storefront panel only renders for authorized visitors. Also adds refund status on cancel and clearer messages when an address change is blocked. Update recommended.

= 0.1.7 =
Display name and directory slug set to ShipEdit. No functional change required after upgrade.

= 0.1.6 =
Author and plugin URI updated for WordPress.org ownership clarity. Adds listing readme details. No functional change required after upgrade.
