=== CompleteGreet - Shoppable Videos and Video Widget ===
Contributors: completegreet
Tags: woocommerce, shoppable-video, product-video, video, ecommerce
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add shoppable video bubbles, product demos, and clickable video campaigns to WordPress and WooCommerce.

== Description ==

Add shoppable video bubbles, product demos, and clickable video campaigns to WordPress and WooCommerce without editing your theme.

Requires a CompleteGreet account. After installing the plugin, click `Connect to CompleteGreet` to sign in or create an account, then paste your campaign code from the CompleteGreet dashboard.

Useful links:

* Live demo: https://completegreet.com/use-cases/shoppable-videos/
* Create account: https://completegreet.com/register/
* Pricing: https://completegreet.com/pricing/
* Integrations: https://completegreet.com/integrations/

Use it for product explainers, founder videos, seasonal offers, sales help, and WooCommerce campaigns where video interaction should be connected to purchases.

What the plugin does:

* connects your WordPress site to your CompleteGreet account with a secure sign-in flow
* shows your main CompleteGreet video bubble across the site
* runs supported shoppable video campaigns, including Video Bubble and Video Popup formats
* lets you paste a campaign code from the CompleteGreet dashboard instead of editing theme files
* connects WooCommerce to CompleteGreet when store tracking is enabled
* sends WooCommerce conversion and purchase events to CompleteGreet when those features are active
* retries failed shoppable purchase sends automatically, so temporary connection issues are less likely to lose tracking data

= Why Use CompleteGreet =

CompleteGreet is built for stores that want video to do more than sit on a page. It helps shoppers watch, click, and move toward a product while your campaign stays managed from one dashboard.

Key reasons to use it:

* no theme editing or manual script pasting after setup
* clickable video buttons for calls, chat, links, forms, bookings, lead capture, and products
* shoppable formats for product discovery, product pages, and campaigns
* WooCommerce purchase tracking when store tracking is enabled
* campaign design, content, and targeting managed from the CompleteGreet dashboard

= Good For =

CompleteGreet is useful when you want visitors to see a real person, product demo, offer, or buying prompt without sending them away from the page they are already viewing.

Typical uses include:

* a site-wide welcome video bubble
* UGC and customer-style product clips
* product demos and how-to videos
* founder videos and personal greetings
* testimonials and social proof videos
* seasonal offers and launch campaigns
* product page video prompts
* shoppable video campaigns for WooCommerce products
* popup video campaigns tied to a product or promotion
* campaign attribution for WooCommerce orders

= Setup In 3 Minutes =

1. Install and activate the plugin.
2. Open `CompleteGreet` in WordPress.
3. Click `Connect to CompleteGreet` to sign in or create an account.
4. Paste a supported campaign code from the CompleteGreet dashboard.
5. Go live and manage video design, targeting, and campaign content from CompleteGreet.

= Where Videos Come From =

You can use short product videos, UGC-style clips, founder videos, testimonials, or videos you already created for social media. CompleteGreet can also import content from Facebook and Instagram in the CompleteGreet dashboard.

= Account Requirement =

You need an active CompleteGreet account to use this plugin. You can create one at https://completegreet.com/register/ or from the plugin setup flow.

The account connection is part of the core service. This plugin is not a standalone video player, video host, or campaign builder.

= External Services =

This plugin uses the external CompleteGreet service. The plugin will not work as a standalone video player without a CompleteGreet account.

CompleteGreet is provided by CompleteGreet. The service terms and privacy policy are here:

Terms of Use: https://completegreet.com/terms-of-use/

Privacy Policy: https://completegreet.com/privacy-policy/

The plugin connects to these CompleteGreet service URLs:

1. `https://backend.completegreet.com`
This is the CompleteGreet API. It is used for account authorization, secure token refresh, connection health checks, shoppable widget format lookup, WooCommerce store connection, and conversion or purchase event delivery.

Data sent to this API can include the site URL, OAuth connection values, refresh tokens for renewing the connection, saved campaign codes, WooCommerce store URL, WooCommerce store name, WooCommerce consumer key and consumer secret when WooCommerce auto-connect is used, order IDs, order totals, order currency, order product IDs, order status, order dates, hashed customer email or phone values where available, visitor IDs, session attribution values, and error/retry data needed to send failed events again.

This data is sent when an admin connects or disconnects the plugin, when the plugin refreshes its connection token, when the plugin checks a saved campaign code, when WooCommerce connection is enabled, when WooCommerce orders or tracked purchase events are processed, and when failed purchase or conversion events are retried.

2. `https://dashboard.completegreet.com`
This is the CompleteGreet dashboard. It is used when an admin clicks links to sign in, register, authorize the plugin, or manage campaigns.

The plugin sends the admin to this dashboard during sign-in, registration, and account management. Any information entered there is handled by the CompleteGreet service under the same terms and privacy policy linked above.

3. `https://backend.completegreet.com/js/CompleteGreetAPI.js`
This remote JavaScript file is loaded on the public site after the plugin is connected so the site-wide CompleteGreet video bubble can appear.

When this script is loaded, the visitor's browser requests the file from CompleteGreet. The plugin includes the connected site's public CompleteGreet user ID in the script tag so the correct bubble can be shown.

4. `https://backend.completegreet.com/shoppable-widget/*.js`
These remote JavaScript files are loaded on the public site when a supported shoppable video campaign is enabled. The exact file depends on the campaign format, such as a floating video bubble or popup.

When these scripts load or run, the visitor's browser requests the files from CompleteGreet. The plugin includes the saved campaign code in the script tag so the correct shoppable video can be shown. The shoppable widget can use visitor IDs, session attribution values, product IDs, campaign IDs, video IDs, and cart or purchase attribution data so CompleteGreet can show the campaign and attribute WooCommerce purchases to video interactions.

= Data Sent To CompleteGreet =

Depending on which features are enabled, the plugin may send this data to CompleteGreet:

* site URL during account connection and connection health checks
* OAuth authorization values during secure sign-in
* refresh token during secure token renewal
* saved campaign code when the plugin checks the campaign format or loads a shoppable widget
* connected site's public CompleteGreet user ID when the site-wide bubble script is loaded
* WooCommerce store URL, store name, consumer key, and consumer secret when WooCommerce auto-connect runs
* WooCommerce order ID, status, total, currency, product IDs, and order date for conversion or purchase tracking
* hashed customer email or phone values, when available, for attribution matching
* visitor IDs, session attribution values, campaign IDs, video IDs, and product IDs when available
* retry error details when failed conversion or purchase events are retried

= Privacy =

This plugin sends data to CompleteGreet only when needed for the connected service features described above.

Privacy Policy: https://completegreet.com/privacy-policy/

Terms of Use: https://completegreet.com/terms-of-use/

= Remote Scripts =

The plugin loads remote JavaScript from CompleteGreet on the public site to render the main CompleteGreet bubble and supported shoppable video formats. Those scripts are part of the CompleteGreet service.

= WooCommerce =

If WooCommerce is active, the plugin can create WooCommerce REST API credentials for the connected CompleteGreet service. Those credentials are stored locally in encrypted form and are revoked when you disconnect the plugin.

= Tracking =

If WooCommerce is active and tracking features are enabled in your CompleteGreet setup, the plugin sends conversion and purchase events to CompleteGreet so orders can be attributed to CompleteGreet interactions.

= Security =

The plugin uses a public OAuth connection flow with PKCE. It does not ship a private OAuth client secret inside the plugin files. WooCommerce API credentials created for CompleteGreet are stored locally in encrypted form and are revoked when you disconnect the plugin.

== Installation ==

1. Upload the `completegreet` folder to `/wp-content/plugins/` or install it through WordPress.org.
2. Activate the plugin in WordPress.
3. Open `CompleteGreet` in the WordPress admin menu.
4. Click `Connect to CompleteGreet` and sign in or create a CompleteGreet account.
5. Paste a supported campaign code from the CompleteGreet dashboard if you want to use Shoppable Videos.

== Frequently Asked Questions ==

= Do I need a CompleteGreet account? =

Yes. The plugin connects your site to the CompleteGreet service. You can create an account during setup or at https://completegreet.com/register/.

= Is CompleteGreet a video hosting plugin? =

No. CompleteGreet is a connected video campaign service. The WordPress plugin connects your site to that service and loads the right video bubble or shoppable campaign.

= Does this plugin work without WooCommerce? =

Yes. The site-wide CompleteGreet bubble can still work without WooCommerce. WooCommerce is only required for store connection and order tracking features.

= What shoppable campaign codes are supported in the plugin settings? =

The plugin settings support Video Bubble (`cg_vb_...`) and Video Popup (`cg_vp_...`) campaign codes.

= Can I change the design or targeting inside WordPress? =

No. The WordPress plugin keeps the site connection simple. Campaign design, placement, targeting, and content are managed in the CompleteGreet dashboard.

= Does the plugin add scripts to my site? =

Yes. After the plugin is connected, it loads CompleteGreet scripts from `backend.completegreet.com` so the video bubble or shoppable campaign can appear on the public site.

= What happens if I disconnect the plugin? =

The plugin revokes the CompleteGreet connection, clears local connection data, and revokes the WooCommerce API key it created for CompleteGreet.

= What if my existing site stops connecting after the new public auth flow? =

Reconnect the site from the CompleteGreet settings page in WordPress. If the site still does not connect, disconnect first, then connect again so the site can complete the new secure sign-in flow.

== Screenshots ==

1. Show fast-loading shoppable videos in multiple formats and track orders.
2. Add product cards and add-to-cart buttons directly inside the video experience.
3. Customize the video style, shape, size, position, colors, buttons, and behavior from CompleteGreet.
4. Upload videos or import content from Facebook and Instagram in the CompleteGreet dashboard.
5. Add clickable video buttons for calls, chat, links, forms, bookings, lead capture, and products.

== Changelog ==

= 1.0.2 =
* Added a fallback OAuth token exchange path for WordPress hosts that receive a 403 block on the normal connection endpoint.
* Added a clearer blocked-request diagnostic with the response server/reference when available.

= 1.0.1 =
* Replaced the secret-based WordPress OAuth flow with a public-safe PKCE connection flow.
* Removed the shipped OAuth client secret from plugin code.
* Added stronger WordPress.org-facing disclosures for external services, remote scripts, and data flows.
* Added direct-access guards and tightened superglobal sanitization in plugin files.
* Gated OAuth debug logging behind `WP_DEBUG`.

= 1.0.0 =
* Initial release.
