# machineitsvcs/buy-on-google-for-woocommerce architecture

> Architecture diagram of the GitHub repository machineitsvcs/buy-on-google-for-woocommerce, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/machineitsvcs/buy-on-google-for-woocommerce
- Repository: https://github.com/machineitsvcs/buy-on-google-for-woocommerce

## Overview

This WordPress/WooCommerce plugin links merchant Google accounts, lets merchants choose accounts to sync, imports Buy on Google orders into WooCommerce, and provides Google-order actions from the WooCommerce order editor. The main implementation is a single large PHP file, so distinct responsibilities below share its path. The README documents the workflow and capabilities; sampled PHP excerpts show order-editor/API activity, but do not expose the full sync implementation. The README also warns that licensed access to the Google application was disabled after the Buy on Google program shut down.

Main entry points: [`buy-on-google-for-woocommerce.php`](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php) (Order sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Merchant setup"]
  node_admin["Plugin settings"]
  node_google_accounts["Google accounts"]
  node_merchant_selection["Merchant selection"]
end

subgraph group_sync["Order synchronization"]
  node_sync["Order sync"]
  node_google["Google API"]
  node_woo_orders[("WooCommerce orders")]
end

subgraph group_management["Order management"]
  node_order_editor["Order editor"]
  node_order_actions["Order actions"]
end

node_merchant(("Merchant"))

node_merchant -->|"configures"| node_admin
node_admin -->|"links accounts"| node_google_accounts
node_merchant -->|"selects merchants"| node_merchant_selection
node_merchant_selection -->|"starts sync"| node_sync
node_sync -->|"imports orders"| node_google
node_sync -->|"creates orders"| node_woo_orders
node_merchant -->|"opens order"| node_order_editor
node_order_editor -->|"offers actions"| node_order_actions
node_order_actions -->|"updates orders"| node_google
node_order_editor -->|"fetches order"| node_google
node_google_accounts -->|"gets credentials"| node_google

click node_admin "https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php"
click node_google_accounts "https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php"
click node_merchant_selection "https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php"
click node_sync "https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php"
click node_order_editor "https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php"
click node_order_actions "https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_admin,node_google_accounts,node_merchant_selection toneBlue
class node_sync,node_google,node_woo_orders toneAmber
class node_order_editor,node_order_actions toneMint
class node_merchant toneIndigo
```

## Components

### Merchant setup

- [Plugin settings](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php): `buy-on-google-for-woocommerce.php`
- [Google accounts](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php): `buy-on-google-for-woocommerce.php`
- [Merchant selection](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php): `buy-on-google-for-woocommerce.php`

### Order synchronization

- [Order sync](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php): `buy-on-google-for-woocommerce.php`
- **Google API**
- **WooCommerce orders**

### Order management

- [Order editor](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php): `buy-on-google-for-woocommerce.php`
- [Order actions](https://github.com/machineitsvcs/buy-on-google-for-woocommerce/blob/main/buy-on-google-for-woocommerce.php): `buy-on-google-for-woocommerce.php`

### Other components

- **Merchant**

## Connections

- Merchant → Plugin settings: configures (evidence: `README.md`)
- Plugin settings → Google accounts: links accounts (evidence: `README.md`)
- Merchant → Merchant selection: selects merchants (evidence: `README.md`)
- Merchant selection → Order sync: starts sync (evidence: `README.md`)
- Order sync → Google API: imports orders (evidence: `README.md`)
- Order sync → WooCommerce orders: creates orders (evidence: `README.md`)
- Merchant → Order editor: opens order (evidence: `README.md`)
- Order editor → Order actions: offers actions (evidence: `README.md`)
- Order actions → Google API: updates orders (evidence: `README.md`)
- Order editor → Google API: fetches order (evidence: `buy-on-google-for-woocommerce.php`)
- Google accounts → Google API: gets credentials (evidence: `buy-on-google-for-woocommerce.php`)
