=== GoBrightCart ===
Contributors: gobrightcart
Tags: ecommerce, checkout, products, embed, stripe
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
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.

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 only when an administrator connects an account, checks connection status, creates an account from the onboarding screen, disconnects an account, syncs products, loads a product embed, or displays checkout widgets.

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 public-facing product widget loads JavaScript from the configured Go BrightCart service URL after the plugin has been connected. This script powers cart and checkout behavior for embedded products.

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

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

= 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.

= 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.1 =

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