Copilot.instructions
---
description: Glitch WooCommerce Payment Gateway plugin coding guidelines — auto-doc sync for plugin, features, and infrastructure
applyTo: '*'
---
# Glitch WooCommerce Payment Gateway — Copilot Instructions
## Project Overview
A bespoke WooCommerce payment gateway plugin for Glitch, a major South African payment provider. Enables merchants to accept online payments (cards, instant EFT, digital wallets, bank transfers) through WooCommerce while routing transactions through Glitch's payment infrastructure.
- **Plugin Root:** `./` — Main plugin file, bootstrap, constants
- **Includes:** `includes/` — Gateway class, API client, webhook handler, admin settings, payment methods
- **Templates:** `templates/` — Checkout and admin template overrides
- **Assets:** `assets/` — CSS, JS, and image assets for checkout and admin
- **Docs:** `docs/` — Architecture, feature logic, and task documentation
- **Examples:** `examples/` — Project description and reference material
## Stack
- **Platform:** WordPress 6.x · WooCommerce 8.x+
- **Language:** PHP 7.4+ / 8.x
- **Database:** MySQL/MariaDB via WordPress `$wpdb`
- **Package Manager:** Composer (for autoloading and dev dependencies)
- **Payment API:** Glitch Payment Gateway REST API
- **Currency:** ZAR (South African Rand)
- **Admin UI:** WooCommerce Settings API
- **Checkout UI:** WooCommerce checkout hooks + PHP templates
- **HTTP Client:** WordPress HTTP API (`wp_remote_post`, `wp_remote_get`)
- **Logging:** WooCommerce Logger (`wc_get_logger()`)
- **Testing:** PHPUnit (WordPress test suite), WP-CLI for integration testing
- **Linting:** PHP_CodeSniffer with WordPress Coding Standards
## Folder Structurewhen to use it
Community prompt sourced from the open-source GitHub repo savedpixel/ai-agent-rules-generator (MIT). A "Copilot.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
savedpixel/ai-agent-rules-generator · MIT