=== GoBrightCart ===
Contributors: gobrightcart
Tags: ecommerce, checkout, products, embed, stripe
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Mirror Go BrightCart products into WordPress and add lightweight checkout widgets with blocks or shortcodes.

== Description ==

Go BrightCart connects WordPress to a Go BrightCart account so sellers can place product widgets, buy buttons, and optional mirrored product pages on an existing WordPress site.

The plugin is an interface to the Go BrightCart hosted commerce service. Products, checkout, orders, protected downloads, Stripe payment setup, and store settings are managed in Go BrightCart. WordPress stores connection settings and optional mirrored product content so your site can display product pages and embeds.

The plugin is free. A Go BrightCart free plan has no subscription charge, but Go BrightCart fees apply to sales, including on the free plan. Paid Go BrightCart plans offer lower Go BrightCart sales fees. Stripe processing fees are separate. To accept payments, you must have your own Stripe account and connect it to Go BrightCart; Go BrightCart does not provide Stripe accounts. See current rates and plan details at https://gobrightcart.com/pricing.

Use Go BrightCart when you want to keep WordPress focused on publishing while Go BrightCart handles cart and checkout.

= What the plugin does =

* Connects WordPress to Go BrightCart using OAuth.
* Stores a WordPress-scoped embed credential for the selected store.
* Provides a Product Embed block.
* Provides `[gbc_product]` and `[gbc_buy]` shortcodes.
* Optionally syncs published products into a `gbc_product` custom post type for WordPress-native product pages.
* Adds Open Graph product metadata and schema.org Product markup to mirrored product pages.

= External services =

This plugin connects to Go BrightCart, a hosted commerce service operated by Go BrightCart.

The plugin contacts Go BrightCart when an administrator connects or creates an account, checks connection status, disconnects an account, or syncs products. On public pages, it loads the hosted cart and checkout script only when a Go BrightCart widget or buy button is rendered. That script contacts Go BrightCart to load the cart and product data and to process checkout; it uses browser local storage for a cart session identifier. Checkout may send the buyer's contact, shipping, and payment-flow information to Go BrightCart and Stripe as needed to complete the order.

Data sent to Go BrightCart can include the WordPress admin callback URL, OAuth authorization code, OAuth state token, account creation details entered by the administrator, a store embed credential, selected store ID, and product/widget identifiers used by blocks or shortcodes. The visitor's IP address is available to the service when the browser requests the script or API.

Optional widget analytics are off by default. An administrator can enable them in the plugin settings. When enabled, widget pages send interaction events, the page URL, referrer, host, and browser timezone to Go BrightCart. Review your site's privacy notice and consent requirements before enabling analytics.

Go BrightCart terms: https://gobrightcart.com/terms

Go BrightCart privacy policy: https://gobrightcart.com/privacy-policy

= Usage =

After activation, open the Go BrightCart admin menu and connect your Go BrightCart account. The plugin will select your active store and provision a WordPress-scoped embed credential.

Use the Product Embed block in the block editor, or use one of these shortcodes:

`[gbc_product id="123" view="card"]`

`[gbc_product id="123" view="buy-box"]`

`[gbc_product id="123" view="button" button_text="Buy Now"]`

For iframe fallback embeds:

`[gbc_product id="123" view="buy-box" fallback="iframe"]`

On mirrored `gbc_product` pages, you can render a buy button:

`[gbc_buy text="Buy Now" quantity="1"]`

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/gobrightcart`, or install the plugin ZIP from the WordPress admin Plugins screen.
2. Activate Go BrightCart.
3. Open the Go BrightCart admin menu.
4. Connect your Go BrightCart account.
5. Add product widgets with the Product Embed block or shortcodes.
6. Optionally open Sync Products to mirror products into WordPress.

== Frequently Asked Questions ==

= Do I need a Go BrightCart account? =

Yes. The plugin connects WordPress to a Go BrightCart account. Product management, checkout, orders, protected downloads, and Stripe setup are handled by Go BrightCart.

= Is the free plan free to sell with? =

The plugin and Go BrightCart free plan have no subscription charge. Go BrightCart fees apply to sales on the free plan, and Stripe processing fees also apply. Paid Go BrightCart plans offer lower Go BrightCart sales fees. You need your own Stripe account to accept payments. See https://gobrightcart.com/pricing for current rates.

= Does the plugin require WooCommerce? =

No. Go BrightCart does not require WooCommerce.

= Where are products managed? =

Products are managed in Go BrightCart. The sync tool can mirror product content into WordPress for SEO-friendly pages.

= Does the plugin call external services? =

Yes. It communicates with Go BrightCart for account connection, product sync, embed credentials, product widgets, cart, and checkout. See the External services section for details.

= Can I use shortcodes without syncing products? =

Yes. Blocks and shortcodes can render widgets directly from Go BrightCart product IDs. Product sync is optional.

== Changelog ==

= 1.0.2 =

* Fixes browser-based account connection, store credential setup, product sync, and token status.
* Drafts mirrored pages for products no longer published and preserves store currency and availability.
* Loads the hosted cart script only where a widget renders; analytics require an administrator opt-in.

= 1.0.1 =

* Adds OAuth connection flow, WordPress-scoped embed credentials, product sync, product embeds, buy buttons, block editor support, and mirrored product templates.
