Version: 1.0.2
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Generate bulk PDF invoices for MemberPress transactions.
This plugin extends the functionality of MemberPress and the MemberPress PDF Invoice add-on by providing a convenient admin interface to generate PDF invoices for multiple transactions at once. It supports both generating invoices for all transactions and generating invoices for a specific time period.
- User-friendly Admin Interface: Clean, intuitive interface integrated into the MemberPress admin menu
- Flexible Generation Options:
- Generate invoices for all transactions
- Generate invoices for a specific date range
- Transaction Status Filtering: Choose which transaction statuses to include (Complete, Confirmed, Pending, Refunded)
- Real-time Statistics: View transaction counts before generation
- Batch Processing: Efficiently handles large datasets by processing transactions in small batches to avoid timeouts
- Visual Progress Tracking: Real-time progress bar with detailed statistics during generation
- Automatic ZIP Creation: Option to automatically create a ZIP file containing all generated PDFs for easy download
- Error Handling: Detailed error reporting for failed generations
- Security: Proper nonce verification and capability checks
- Performance Optimization: Minified CSS and JavaScript for faster loading
- WordPress Standards: Compliant with WordPress coding standards
- WordPress 5.0 or higher
- MemberPress plugin (active)
- MemberPress PDF Invoice add-on (active)
- PHP 7.4 or higher
- PHP ZipArchive extension (for ZIP file creation)
For development and building minified assets:
- Node.js 14 or higher
- npm (comes with Node.js)
See BUILD.md for detailed build instructions.
pdf-invoice-generator-for-memberpress/
├── pdf-invoice-generator-for-memberpress.php (Main plugin file)
├── assets/
│ ├── css/
│ │ ├── admin.css (Source styles)
│ │ └── admin.min.css (Minified styles)
│ └── js/
│ ├── admin.js (Source functionality)
│ └── admin.min.js (Minified functionality)
├── screenshots/
│ └── dashboard.png (Plugin interface screenshot)
├── install.php (Installation script)
├── uninstall.php (Cleanup script)
├── README.md (Documentation)
├── CHANGELOG.md (Version history)
├── LICENSE (GPL v2.0 license)
└── composer.json (Composer configuration)
**Development files (not included in releases):**
- `package.json` - Node.js dependencies
- `webpack.config.js` - Build configuration
- `build.sh` - Build script
- `BUILD.md` - Build documentation
## Release Process
To create a release:
1. Run `npm run build` to generate minified assets and create release ZIP
2. The build script automatically creates a ZIP file excluding development files and screenshots
3. Upload the generated ZIP from `release/` folder to WordPress plugin repository or distribute manually
**Note:** Screenshots are included in the GitHub repository for documentation but excluded from release ZIP files to keep the distribution package clean.
-
Upload the Plugin:
- Upload the
pdf-invoice-generator-for-memberpressfolder to your/wp-content/plugins/directory - Or zip the folder and upload via WordPress admin
- Upload the
-
Activate the Plugin:
- Go to Plugins > Installed Plugins
- Find "PDF Invoice Generator for MemberPress" and click Activate
-
Verify Dependencies:
- Ensure MemberPress is active
- Ensure MemberPress PDF Invoice add-on is active
- The plugin will show an error notice if dependencies are missing
- Go to MemberPress > PDF Invoices in your WordPress admin
- The tool will be available under the MemberPress menu
- Select "Generate All Invoices" from the Generation Type dropdown
- Choose which transaction statuses to include (Complete, Confirmed, Pending, Refunded)
- Check or uncheck "Create ZIP File" option (recommended for easy download)
- Click "Generate Invoices"
- Watch the progress bar as transactions are processed in batches
- Wait for the process to complete
- Check the results section for success/error messages
- Download the ZIP file if created
- Select "Generate Invoices for Specific Period" from the Generation Type dropdown
- Set the Start Date and End Date (with time if needed)
- Choose which transaction statuses to include (Complete, Confirmed, Pending, Refunded)
- Check or uncheck "Create ZIP File" option
- Click "Generate Invoices"
- Watch the progress bar as transactions are processed in batches
- Wait for the process to complete
- Check the results section for success/error messages
- Download the ZIP file if created
Generated PDF invoices are saved in:
wp-content/uploads/mepr/mpdf/
ZIP files (when enabled) are saved in:
wp-content/uploads/mepr/mpdf/memberpress-invoices-YYYY-MM-DD-HH-MM-SS.zip
- Download Existing Files: If you've run the generator before, download the existing PDF files from
wp-content/uploads/mepr/mpdf/before running again - File Overwriting: New generations will overwrite existing files with the same names
- Batch Processing: Large numbers of transactions are processed efficiently in small batches
- ZIP Files: Enable ZIP creation for easier file management and download
Only transactions with these statuses will be processed:
- Complete: Successfully completed transactions
- Confirmed: Confirmed transactions
- Pending: Pending transactions (awaiting payment confirmation)
- Refunded: Refunded transactions
-
"MemberPress PDF Invoice add-on is not active"
- Ensure the MemberPress PDF Invoice add-on is installed and activated
- Check that it's compatible with your MemberPress version
-
"No transactions found"
- Verify that transactions exist in your MemberPress database
- Check that the selected statuses match your transaction statuses
- For period generation, ensure the date range includes transactions
-
"Permission denied" errors
- Ensure you have administrator privileges
- Check WordPress file permissions for the uploads directory
-
PDF generation fails
- Verify that the
wp-content/uploads/mepr/mpdf/directory exists and is writable - Check server memory limits for large batches
- Ensure the MPDF library is properly installed
- Verify that the
-
ZIP creation fails
- Ensure PHP ZipArchive extension is installed and enabled
- Check write permissions for the uploads directory
- Verify sufficient disk space for ZIP file creation
The plugin provides a filter hook for customization:
mpfig_batch_size - Modify the number of transactions processed per batch
add_filter( 'mpfig_batch_size', function( $batch_size ) {
return 25; // Process 25 transactions per batch instead of 10
});Example usage for better performance:
// Increase batch size for faster processing on powerful servers
add_filter( 'mpfig_batch_size', function( $batch_size ) {
return 50; // This will significantly reduce processing time for large datasets
});For support and feature requests, please contact the plugin developer.
This plugin is licensed under the GNU General Public License v2.0. See the LICENSE file for details.
- Built for MemberPress
- Uses the MemberPress PDF Invoice add-on functionality
- jQuery UI Datepicker for date selection
- PHP ZipArchive for ZIP file creation
