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/ahmadreza-log/wc-invoice/archive/refs/heads/master.zipProfessional invoice generator plugin for WooCommerce with PDF and HTML invoice generation capabilities
📋 Table of Contents
✨ Features
- 🎯 Automatic Invoice Generation - Automatically generate invoices for WooCommerce orders
- 📊 Invoice Management - Manage all invoices from the admin panel
- 📥 Download Capability - Download invoices in multiple formats
- 🎨 Customizable Templates - Multiple invoice templates to choose from
- 🔢 Custom Invoice Numbers - Configure your own invoice number prefix
- 🌍 Internationalization Ready - Fully translatable with WordPress i18n
- ⚡ PSR-4 Autoloading - Modern code structure without Composer dependency
- 🔒 Secure - Built with WordPress security best practices
🚀 Installation
Manual Installation
- Download or clone this repository
- Upload the
wc-invoicefolder to/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Make sure WooCommerce is installed and activated
Via Git
cd wp-content/plugins/
git clone https://github.com/ahmadreza-log/wc-invoice.git
📖 Usage
After activating the plugin:
- Navigate to WC Invoice in the WordPress admin menu
- Configure invoice settings (prefix, template, etc.)
- Generate invoices from WooCommerce orders page
- View and download invoices from the order edit page
Generating an Invoice
- Go to WooCommerce → Orders
- Open an order
- Click Generate Invoice button in the invoice meta box
- Download or view the generated invoice
📋 Requirements
- WordPress: 5.8 or higher
- PHP: 7.4 or higher
- WooCommerce: 5.0 or higher
- MySQL: 5.6 or higher
📁 Project Structure
wc-invoice/
├── 📂 assets/
│ ├── 📂 css/
│ │ ├── admin.css
│ │ └── frontend.css
│ └── 📂 js/
│ └── admin.js
├── 📂 includes/
│ ├── Admin.php
│ ├── Ajax.php
│ ├── Database.php
│ ├── Enqueue.php
│ ├── Generator.php
│ ├── Notices.php
│ ├── Woocommerce.php
│ └── 📂 helpers/
│ └── functions.php
├── 📂 templates/
│ └── invoice.php
├── 📂 vendor/
│ └── Autoloader.php
├── 📂 languages/
├── wc-invoice.php
├── uninstall.php
└── README.md
🛠️ Development
This plugin uses PSR-4 Autoloading and does not require Composer.
Namespace Structure
WC_Invoice- Main classesWC_Invoice\Admin- Admin panel related classesWC_Invoice\Helpers- Helper functionsWC_Invoice\Integrations- Integration with other plugins
Setting Up Development Environment
- Clone the repository
- Navigate to the plugin directory
- The plugin uses WordPress coding standards
- All classes follow PSR-4 autoloading convention
Code Style
- Follow WordPress Coding Standards
- Use PSR-4 autoloading
- All user-facing strings must be translatable
- Use type hints where possible (PHP 7.4+)
🌍 Internationalization
The plugin is fully internationalized and ready for translation. All user-facing strings use WordPress translation functions (__(), _e(), esc_html__(), etc.) with the text domain wc-invoice.
Translating the Plugin
- Use a translation tool like Poedit
- Scan the plugin files for translatable strings
- Create translation files in
languages/folder - Use format:
wc-invoice-{locale}.poandwc-invoice-{locale}.mo
🤝 Contributing
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
📝 Changelog
See CHANGELOG.md for a list of changes and version history.
🔒 Security
If you discover any security-related issues, please email security@ahmadreza.me instead of using the issue tracker.
📄 License
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
👤 Author
Ahmadreza Ebrahimi
- Website: ahmadreza.me
- GitHub: @ahmadreza-log
- WordPress: @ahmad_r3za
🙏 Acknowledgments
- Built for the WordPress and WooCommerce community
- Inspired by the need for simple, effective invoice generation
⭐ If you find this plugin useful, please consider giving it a star on GitHub!