# Global-e Cross-Border for WooCommerce — Overview

**Plugin slug:** `global-e-cross-border-for-woocommerce`  
**Current version:** 1.15.0  
**PHP namespace root:** `GCBWC\Globale\Pro`  
**Main entry point:** `globale-cross-border-for-woocommerce.php` (class `GCBWC`)  
**WooCommerce integration ID:** `globale_pro`

## Purpose

This plugin is the official WooCommerce integration for Global-e's cross-border ecommerce platform. It connects a WooCommerce store to Global-e's GEPI/GEM services so that international shoppers receive a localised checkout experience (local currency, local payment methods, duty and tax calculation, multi-lingual checkout). All cross-border order management — including payment notifications, status updates, shipping tracking, and refunds — is handled through inbound webhook callbacks that the plugin exposes as WooCommerce API endpoints.

## Documents in this corpus

| File | What it covers |
|---|---|
| [architecture.md](architecture.md) | Plugin bootstrap, PSR-0 autoloader, class map, HPOS compatibility |
| [api-endpoints.md](api-endpoints.md) | Every `woocommerce_api_*` action the plugin registers, request/response shapes |
| [configuration.md](configuration.md) | Full list of `Config` constants, option keys, and admin form fields |
| [order-lifecycle.md](order-lifecycle.md) | End-to-end flow: cart → order create → payment → status → shipping → refund |
| [cart-integration.md](cart-integration.md) | Cart info request, session bootstrap, cookie contract, country/currency injection |
| [extension-hooks.md](extension-hooks.md) | All WordPress filters and actions exposed for merchant customisation |
| [analytics-integration.md](analytics-integration.md) | GA4, Facebook Pixel, TikTok Pixel — how checkout-step events are emitted |

## Key integration touch-points

- **Global-e JS/CSS injection** — `GlobaleProIntegration::enqueueScriptsAndStyles()` loads PRO or GEM mode assets on non-admin, non-404, non-REST pages when the integration is enabled.
- **Inbound webhooks** — Global-e's back-end calls the WooCommerce REST-like endpoints (e.g. `/?wc-api=pro-order-create-update`) to drive the full order lifecycle.
- **Session bootstrapping** — `Helper\Session` reads the `GlobalE_Data` cookie to inject country and currency into WooCommerce before pricing and cart calculations happen.
- **Third-party compatibility** — Filters for Aelia Currency Switcher, WC Price Based on Country (WCPBC), Advanced Coupons (ACFWF), and Sequential Order Numbers are activated automatically.

## Namespace / class map summary

```
GCBWC                              → globale-cross-border-for-woocommerce.php
GCBWC\Globale\Pro\GlobalePro       → includes/GlobalePro.php  (action router, REST checks)
GCBWC\Globale\Pro\GlobaleProIntegration → includes/GlobaleProIntegration.php (WC_Integration)
GCBWC\Globale\Pro\Config           → includes/Config.php  (all settings constants + accessors)
GCBWC\Globale\Pro\GlobaleProInstall → includes/GlobaleProInstall.php
GCBWC\Globale\Pro\Api\Cart         → includes/Api/Cart.php
GCBWC\Globale\Pro\Api\Order        → includes/Api/Order.php
GCBWC\Globale\Pro\Api\App          → includes/Api/App.php
GCBWC\Globale\Pro\Api\PluginInfo   → includes/Api/PluginInfo.php
GCBWC\Globale\Pro\Api\ValidateCartVoucher → includes/Api/ValidateCartVoucher.php
GCBWC\Globale\Pro\Model\Cart       → includes/Model/Cart.php
GCBWC\Globale\Pro\Model\Order      → includes/Model/Order.php
GCBWC\Globale\Pro\Model\Product    → includes/Model/Product.php
GCBWC\Globale\Pro\Helper\Session   → includes/Helper/Session.php
GCBWC\Globale\Pro\Helper\Data      → includes/Helper/Data.php
GCBWC\Globale\Pro\Helper\Cookie    → includes/Helper/Cookie.php
GCBWC\Globale\Pro\Admin\Order      → includes/Admin/Order.php
GCBWC\Globale\Pro\Admin\ProductSaveHandler → includes/Admin/ProductSaveHandler.php
```
