Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/m-haris-dev/test-gateway/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Test Gateway WooCommerce Plugin
Description
Custom payment gateway for WooCommerce that accepts a special test code (TESTPAY). Logs all transactions in a custom database table and is always enabled by default.
Features
- Always enabled Test Gateway on checkout
- Accepts code
TESTPAYto mark order as paid - Logs transactions: Order ID, Amount, Status, Date
- Admin page to view logs
- Modular class-based design
Installation
- Upload
test-gatewayfolder to/wp-content/plugins/. - Activate plugin from WordPress admin.
- Checkout page will automatically show Test Gateway.
- Enter
TESTPAYto complete payment. - Logs can be viewed under Test Gateway Logs in admin.
Hooks Used
woocommerce_payment_gateways→ register gatewaywoocommerce_available_payment_gateways→ force gateway availableregister_activation_hook→ create DB table & default settingsadd_menu_page→ admin logs page
Notes
- All gateway code prefixed with
tg_ - DB table:
wp_tg_transactions - Error logging via
error_log()to debug issues