A WordPress plugin that manages the generation and usage of coupons for annual subscriptions. When a user purchases an annual subscription, the plugin automatically generates 12 monthly coupons that can be used for products in the "Ecological Theme" category.
QB Coupons integrates with WooCommerce to provide automatic coupon generation and management for annual subscription purchases. Each coupon provides a fixed discount of $4.99 and can be used once for products in the specified category.
- Automatic generation of 12 monthly coupons upon annual subscription purchase
- User-specific coupon restrictions
- Easy-to-use coupon display interface
- One-click coupon code copying
- Multi-language support (English and Spanish included)
- Category-specific coupon restrictions
- Upload the
qb-coupons
directory to the/wp-content/plugins/
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Ensure WooCommerce is installed and activated
- Create a product category named "Ecological Theme" ("Tema Ecológico")
Use the following shortcode to display available coupons to logged-in users:
[user_coupons]
This shortcode will:
- Display all unused coupons for the logged-in user
- Show a copy button for each coupon
- Provide visual feedback when a coupon is copied
- Include instructions for using the coupons
Example placement:
- Add to any page or post using the WordPress editor
- Add to your theme template using:
<?php echo do_shortcode('[user_coupons]'); ?>
qb-coupons/
├── languages/
│ ├── qb-coupons.pot
│ ├── qb-coupons-es_ES.po
│ └── qb-coupons-es_ES.mo
├── .gitignore
├── README.md
└── qb-coupons.php
The plugin supports internationalization and includes:
- English (default)
- Spanish (es_ES)
To add new translations:
- Use the provided POT file as a template
- Create new PO files for your language
- Generate corresponding MO files
- Place them in the
languages
directory
For bug reports and feature requests, please use the GitHub issues page.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
Adalberto H. Vega
- GitHub: @ahvega
- Email: bertovega@gmail.com
- Initial release
- Basic coupon generation functionality
- User interface for displaying available coupons
- Multi-language support (English and Spanish)