Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/al-nemirov/wc-voucher-manager/releases/download/v1.2.1/wc-voucher-manager.zipEnglish
WooCommerce plugin that replaces the standard coupon system with a beautiful Voucher Manager. Bulk creation, usage tracking, adaptive admin UI, and delightful frontend notifications.
Features
- Full rename: "Coupon" → "Voucher" across the entire WooCommerce interface (admin + frontend, EN/RU)
- Custom admin page: Voucher table with status badges, usage bars, expiry warnings, batch filtering
- Bulk generation: Create up to 1000 vouchers at once via AJAX with progress bar
- Usage tracking: Date, customer email, order ID, full history per voucher
- Frontend toast: Animated notification with confetti when a voucher is applied in the cart
- Thank-you banner: Beautiful message on the order confirmation page showing savings
- CSV export: Export all vouchers or a specific batch
- Statistics dashboard: Cards with totals, active/used/expired counts, recent batches
- Responsive design: 4 breakpoints (1200 / 960 / 782 / 480px)
- HPOS compatible: Supports WooCommerce High-Performance Order Storage
- Single menu entry: Replaces default WooCommerce coupon menu with one "Vouchers" page
Requirements
| Dependency | Version |
|---|---|
| WordPress | 5.0+ |
| WooCommerce | 5.0+ |
| PHP | 7.4+ |
Installation
Manual upload
- Download the latest release as a
.ziparchive. - In WordPress admin go to Plugins > Add New > Upload Plugin.
- Select the
.zipfile and click Install Now. - Activate the plugin.
Via FTP / file manager
- Copy the
wc-voucher-managerfolder intowp-content/plugins/. - In WordPress admin go to Plugins and activate WC Voucher Manager.
Via Git (for development)
cd wp-content/plugins/
git clone https://github.com/al-nemirov/wc-voucher-manager.git
Activate the plugin from the WordPress admin panel.
Usage
- Navigate to WooCommerce > Vouchers in the admin sidebar.
- All vouchers tab — view, search, filter by status, sort, bulk actions (trash / deactivate / activate).
- Bulk creation tab — set quantity, prefix, discount type/amount, expiry, usage limit, then click Create vouchers.
- Statistics tab — overview cards and recent batch history.
- On the frontend, when a customer applies a voucher code in the cart, they see an animated toast with confetti and a friendly message.
- On the order confirmation page, a banner shows the savings from the applied voucher.
Plugin Structure
wc-voucher-manager/
├── wc-voucher-manager.php # Main plugin file
├── includes/
│ ├── class-voucher-renamer.php # Coupon → Voucher text replacement
│ ├── class-voucher-admin.php # Admin page, WP_List_Table, tabs
│ ├── class-voucher-generator.php # Bulk creation via AJAX + CSV export
│ ├── class-voucher-tracker.php # Usage tracking, order metabox, column
│ └── class-voucher-frontend.php # Toast notification, thank-you banner
├── assets/
│ ├── css/
│ │ ├── admin.css # Admin styles (responsive)
│ │ └── frontend.css # Frontend styles (toast, banner, cart)
│ └── js/
│ ├── admin.js # Admin scripts (generator, toasts, copy)
│ └── frontend.js # Frontend scripts (toast, confetti)
└── templates/
AJAX Actions
| Action | Method | Description |
|---|---|---|
wc_voucher_generate_batch |
POST | Generate a batch of vouchers |
wc_voucher_export_csv |
GET | Export vouchers as CSV |
All actions require a valid wc_voucher_nonce and the manage_woocommerce capability.
Contributing
Contributions are welcome! To get started:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/my-feature. - Commit your changes with clear messages.
- Push to your fork and open a Pull Request.
Русский
Плагин WooCommerce, который заменяет стандартную систему купонов на красивый Менеджер ваучеров. Массовое создание, отслеживание использования, адаптивный интерфейс админки и приятные уведомления на фронтенде.
Возможности
- Полное переименование: «Купон» → «Ваучер» по всему интерфейсу WooCommerce (админка + фронтенд, EN/RU)
- Кастомная админ-страница: таблица ваучеров со статус-бейджами, прогресс-баром использований, предупреждениями об истечении, фильтром по партиям
- Массовое создание: до 1000 ваучеров за раз через AJAX с прогресс-баром
- Отслеживание использования: дата, email покупателя, ID заказа, полная история по каждому ваучеру
- Toast-уведомление: анимированное уведомление с конфетти при применении ваучера в корзине
- Баннер «Спасибо»: красивое сообщение на странице подтверждения заказа с суммой экономии
- Экспорт в CSV: все ваучеры или конкретная партия
- Дашборд статистики: карточки с итогами, активные/использованные/истёкшие, последние партии
- Адаптивная вёрстка: 4 брейкпоинта (1200 / 960 / 782 / 480px)
- HPOS совместимость: поддержка High-Performance Order Storage WooCommerce
- Один пункт меню: заменяет стандартный пункт купонов WooCommerce на единственную страницу «Ваучеры»
Требования
| Зависимость | Версия |
|---|---|
| WordPress | 5.0+ |
| WooCommerce | 5.0+ |
| PHP | 7.4+ |
Установка
Ручная загрузка
- Скачайте последний релиз в виде
.zipархива. - В админке WordPress перейдите в Плагины > Добавить новый > Загрузить плагин.
- Выберите
.zipфайл и нажмите Установить. - Активируйте плагин.
Через FTP / файловый менеджер
- Скопируйте папку
wc-voucher-managerвwp-content/plugins/. - В админке WordPress перейдите в Плагины и активируйте WC Voucher Manager.
Через Git (для разработки)
cd wp-content/plugins/
git clone https://github.com/al-nemirov/wc-voucher-manager.git
Активируйте плагин через панель администратора WordPress.
Использование
- Перейдите в WooCommerce > Ваучеры в боковом меню админки.
- Вкладка Все ваучеры — просмотр, поиск, фильтрация по статусу, сортировка, массовые действия (в корзину / деактивировать / активировать).
- Вкладка Массовое создание — укажите количество, префикс, тип/сумму скидки, дату истечения, лимит использований, затем нажмите Создать ваучеры.
- Вкладка Статистика — обзорные карточки и история последних партий.
- На фронтенде, когда покупатель применяет код ваучера в корзине, появляется анимированный toast с конфетти и приятным сообщением.
- На странице подтверждения заказа отображается баннер с суммой экономии по ваучеру.
Структура плагина
wc-voucher-manager/
├── wc-voucher-manager.php # Главный файл плагина
├── includes/
│ ├── class-voucher-renamer.php # Замена Купон → Ваучер
│ ├── class-voucher-admin.php # Админ-страница, WP_List_Table, вкладки
│ ├── class-voucher-generator.php # Массовое создание через AJAX + CSV экспорт
│ ├── class-voucher-tracker.php # Трекинг использования, метабокс заказа, колонка
│ └── class-voucher-frontend.php # Toast-уведомление, баннер «Спасибо»
├── assets/
│ ├── css/
│ │ ├── admin.css # Стили админки (адаптивные)
│ │ └── frontend.css # Стили фронтенда (toast, баннер, корзина)
│ └── js/
│ ├── admin.js # Скрипты админки (генератор, тосты, копирование)
│ └── frontend.js # Скрипты фронтенда (toast, конфетти)
└── templates/
AJAX-действия
| Действие | Метод | Описание |
|---|---|---|
wc_voucher_generate_batch |
POST | Генерация партии ваучеров |
wc_voucher_export_csv |
GET | Экспорт ваучеров в CSV |
Все действия требуют валидный nonce wc_voucher_nonce и право manage_woocommerce.
Участие в разработке
Мы рады вашему участию! Для начала:
- Сделайте форк репозитория.
- Создайте ветку:
git checkout -b feature/my-feature. - Закоммитьте изменения с понятным описанием.
- Отправьте в свой форк и откройте Pull Request.
Changelog
1.3.0
- New: Dashboard widget showing voucher stats (total / active / used / expired, 7-day usage) with 5-minute transient cache.
- New: WP-CLI commands
wp voucher generateandwp voucher stats. - Fix: Expiry date from the bulk-generate form is now parsed in the WordPress site timezone instead of the server timezone.
- Fix: Settings form now verifies
manage_woocommercecapability, unslashes nonce/input, and escapes option keys in form attributes. - Fix: CSV export emits quoted
Content-Dispositionfilename andnocache_headers(). - Fix: Coupon save wrapped in try/catch — one bad record no longer aborts a batch.
- Fix: Stats tab casts counts with
absint()before output. - Chore: Plugin header version bumped (was stuck at 1.2.0 since the 1.2.1 release).
- Chore:
.gitignoreadded; build.zipno longer tracked.
1.2.1
- Fix duplicate menu; default naming set to Coupon / Купон.
- Replace deprecated
current_time('timestamp')withtime().
1.2.0
- Full i18n, settings page, language files.
1.1.0
- Initial public release.
Author / Автор
Alexander Nemirov
License / Лицензия
Releases
4 releases. Each count is every asset in that release; expand a row for the breakdown.