WooGithub is an enterprise-grade WordPress plugin developed to automate access management for digital software products sold through WooCommerce.
When a customer purchases a product linked to a GitHub repository (such as digital licenses, private repos, themes, or software toolkits), WooGithub seamlessly captures their GitHub username during checkout (or post-purchase) and dispatches collaborator access to the target repository via the GitHub REST API.
Engineered to conform with modern WordPress 7.0+ standards, WooGithub leverages Block Checkout APIs, High-Performance Order Storage (HPOS), Action Scheduler event queues, AES-256-CBC token encryption, and React-based @wordpress/dataviews administrative interfaces.
Key Features
- Automated Access Provisioning: Immediately dispatches repository invitations (
PUT /repos/{owner}/{repo}/collaborators/{username}) with customizable access permissions (default:read) upon order completion. - Automated Access Revocation: Listens for order cancellations and refunds (
woocommerce_order_status_refunded,woocommerce_order_status_cancelled) to automatically revoke contributor access (DELETE /repos/{owner}/{repo}/collaborators/{username}). - Flexible Username Collection: Features native Block Checkout integration via
woocommerce_register_additional_checkout_fieldwith JSON Schema conditional rendering for carts containing digital products, alongside a React-powered post-purchase Block (github-username-collector) on the Order Confirmation page. - Resilient Asynchronous Engine: Decouples payment transactions from external API latencies using Action Scheduler, incorporating exponential backoff retries for transient errors (429 Rate Limit, 502 Bad Gateway) and recording permanent failures (404 Not Found) in WooCommerce order notes.
- Enterprise AES-256-CBC Cryptography: Encrypts GitHub Personal Access Tokens (PAT) at rest using OpenSSL with dynamic initialization vectors (IV) derived from the native
SECURE_AUTH_KEYconstant. - Granular Product Catalog Mapping: Adds dedicated metadata options (
_github_access_enabled,_github_target_repo,_github_permission_level) to WooCommerce product edit screens (woocommerce_product_options_general_product_data). - Modern React Admin UI (
DataViews): Employs@wordpress/dataviews(DataFormandDataViews) for settings management, client-side filtering, and real-time audit logging of invitation statuses.
Environment Requirements
| Technical Layer | Requirement / Standard | Notes |
|---|---|---|
| WordPress Core | Version 7.0+ («Armstrong») | Built for Block Editor and DataViews standards |
| WooCommerce | Version 9.0+ | Requires Block Checkout & HPOS support |
| PHP Version | PHP 8.3+ | Minimum: PHP 7.4 (Strict typing & OOP recommended) |
| Database | MySQL 8.0+ / MariaDB 10.6+ | Required for DataViews query support |
| PHP Memory Limit | 256 MB minimum (512 MB optimal) | Ensures smooth async queue processing |
| Authentication | Fine-grained Personal Access Token | Scope: Repository Administration (Read/Write) |
Project Structure
WooGithub follows a modular, MVC-inspired directory layout designed for readability, scalability, and ease of extension within the WordPress lifecycle:
woo-github/
├── woo-github.php # Main plugin bootstrap and metadata header
├── README.md # Project documentation and technical reference
└── includes/
├── api-routes.php # Centralized REST API routing and endpoint declarations
└── controllers/ # Business logic controllers and data processorsPlaintextArchitecture & System Workflow
[Store Owner] ──► [Configures PAT in Admin (AES-256-CBC Encrypted)]
│
[Product Catalog] ──► [Links Product SKU to GitHub Repo (owner/repo)]
│
[Customer Checkout] ──► [Captures GitHub Username via Block Checkout / Order Confirmation]
│
[Order Completed] ──► [Enqueues Task in Action Scheduler] (Non-blocking)
│
├─► HTTP 201/204: Collaborator Invited
├─► HTTP 429/502: Retries with Exponential Backoff
└─► HTTP 404: Logs Warning to WooCommerce Order Notes
│
[Order Refunded/Cancelled] ──► [Enqueues Revocation Task] ──► [DELETE Collaborator API]PlaintextInstallation & Local Development
- Clone Repository:
Clone the plugin repository directly into your WordPresspluginsdirectory:
cd wp-content/plugins/
git clone https://github.com/your-username/woo-github.gitBash- Activate Plugin:
Log in to your WordPress Admin dashboard, navigate to Plugins, and activate WooGithub. - Configure Settings:
Navigate to the WooGithub settings menu, input your GitHub Fine-grained Personal Access Token (PAT), and link your WooCommerce digital products to target GitHub repositories. - Extending the Codebase:
- Register custom REST endpoints inside
includes/api-routes.php. - Add new data controllers or business logic modules under
includes/controllers/.
Portfolio Showcase Highlights
This repository highlights core competencies in software architecture:
- Designing asynchronous event-driven integrations with external REST APIs.
- Implementing encryption-at-rest for sensitive third-party API credentials.
- Leveraging modern WordPress 7.0+ APIs (
@wordpress/dataviews, Block Checkout, HPOS, Action Scheduler). - Crafting scalable, maintainable PHP code using clean directory architecture.
License
Distributed under the GPLv2 or later License. See woo-github.php header comments for details.Automate, secure, and streamline digital software delivery by connecting WooCommerce purchases to private GitHub repositories asynchronously.
Executive Summary
WooGithub is an enterprise-grade WordPress plugin developed to automate access management for digital software products sold through WooCommerce.
When a customer purchases a product linked to a GitHub repository (such as digital licenses, private repos, themes, or software toolkits), WooGithub seamlessly captures their GitHub username during checkout (or post-purchase) and dispatches collaborator access to the target repository via the GitHub REST API.
Engineered to conform with modern WordPress 7.0+ standards, WooGithub leverages Block Checkout APIs, High-Performance Order Storage (HPOS), Action Scheduler event queues, AES-256-CBC token encryption, and React-based @wordpress/dataviews administrative interfaces.
Key Features
- Automated Access Provisioning: Immediately dispatches repository invitations (
PUT /repos/{owner}/{repo}/collaborators/{username}) with customizable access permissions (default:read) upon order completion. - Automated Access Revocation: Listens for order cancellations and refunds (
woocommerce_order_status_refunded,woocommerce_order_status_cancelled) to automatically revoke contributor access (DELETE /repos/{owner}/{repo}/collaborators/{username}). - Flexible Username Collection: Features native Block Checkout integration via
woocommerce_register_additional_checkout_fieldwith JSON Schema conditional rendering for carts containing digital products, alongside a React-powered post-purchase Block (github-username-collector) on the Order Confirmation page. - Resilient Asynchronous Engine: Decouples payment transactions from external API latencies using Action Scheduler, incorporating exponential backoff retries for transient errors (429 Rate Limit, 502 Bad Gateway) and recording permanent failures (404 Not Found) in WooCommerce order notes.
- Enterprise AES-256-CBC Cryptography: Encrypts GitHub Personal Access Tokens (PAT) at rest using OpenSSL with dynamic initialization vectors (IV) derived from the native
SECURE_AUTH_KEYconstant. - Granular Product Catalog Mapping: Adds dedicated metadata options (
_github_access_enabled,_github_target_repo,_github_permission_level) to WooCommerce product edit screens (woocommerce_product_options_general_product_data). - Modern React Admin UI (
DataViews): Employs@wordpress/dataviews(DataFormandDataViews) for settings management, client-side filtering, and real-time audit logging of invitation statuses.
Environment Requirements
| Technical Layer | Requirement / Standard | Notes |
|---|---|---|
| WordPress Core | Version 7.0+ («Armstrong») | Built for Block Editor and DataViews standards |
| WooCommerce | Version 9.0+ | Requires Block Checkout & HPOS support |
| PHP Version | PHP 8.3+ | Minimum: PHP 7.4 (Strict typing & OOP recommended) |
| Database | MySQL 8.0+ / MariaDB 10.6+ | Required for DataViews query support |
| PHP Memory Limit | 256 MB minimum (512 MB optimal) | Ensures smooth async queue processing |
| Authentication | Fine-grained Personal Access Token | Scope: Repository Administration (Read/Write) |
Project Structure
WooGithub follows a modular, MVC-inspired directory layout designed for readability, scalability, and ease of extension within the WordPress lifecycle:
woo-github/
├── woo-github.php # Main plugin bootstrap and metadata header
├── README.md # Project documentation and technical reference
└── includes/
├── api-routes.php # Centralized REST API routing and endpoint declarations
└── controllers/ # Business logic controllers and data processorsPlaintextArchitecture & System Workflow
[Store Owner] ──► [Configures PAT in Admin (AES-256-CBC Encrypted)]
│
[Product Catalog] ──► [Links Product SKU to GitHub Repo (owner/repo)]
│
[Customer Checkout] ──► [Captures GitHub Username via Block Checkout / Order Confirmation]
│
[Order Completed] ──► [Enqueues Task in Action Scheduler] (Non-blocking)
│
├─► HTTP 201/204: Collaborator Invited
├─► HTTP 429/502: Retries with Exponential Backoff
└─► HTTP 404: Logs Warning to WooCommerce Order Notes
│
[Order Refunded/Cancelled] ──► [Enqueues Revocation Task] ──► [DELETE Collaborator API]PlaintextInstallation & Local Development
- Clone Repository:
Clone the plugin repository directly into your WordPresspluginsdirectory:
cd wp-content/plugins/
git clone https://github.com/your-username/woo-github.gitBash- Activate Plugin:
Log in to your WordPress Admin dashboard, navigate to Plugins, and activate WooGithub. - Configure Settings:
Navigate to the WooGithub settings menu, input your GitHub Fine-grained Personal Access Token (PAT), and link your WooCommerce digital products to target GitHub repositories. - Extending the Codebase:
- Register custom REST endpoints inside
includes/api-routes.php. - Add new data controllers or business logic modules under
includes/controllers/.
Highlights
This repository highlights core competencies in software architecture:
- Designing asynchronous event-driven integrations with external REST APIs.
- Implementing encryption-at-rest for sensitive third-party API credentials.
- Leveraging modern WordPress 7.0+ APIs (
@wordpress/dataviews, Block Checkout, HPOS, Action Scheduler). - Crafting scalable, maintainable PHP code using clean directory architecture.