mralaminahamed / woocommerce-product-addons-stubs
WooCommerce Product Add-Ons function and class declaration stubs for static analysis.
Package info
github.com/mralaminahamed/phpstan-woocommerce-product-addons-stubs
pkg:composer/mralaminahamed/woocommerce-product-addons-stubs
Requires
- php: >=7.4
- php-stubs/woocommerce-stubs: dev-master
- php-stubs/wordpress-stubs: ^5.3 || ^6.0
Requires (Dev)
- php-stubs/generator: ^0.8.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^7.5 || ^8.5 || ^9.5
- squizlabs/php_codesniffer: ^3.7
Suggests
- symfony/polyfill-php73: Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
- szepeviktor/phpstan-wordpress: WordPress extensions for PHPStan
This package is auto-updated.
Last update: 2026-06-15 06:36:02 UTC
README
PHP stub declarations for the WooCommerce Product Add-Ons extension to enhance IDE completion and static analysis capabilities. Generated using php-stubs/generator directly from the source code.
🚀 Features
- Complete function, class, and interface declarations
- Constant definitions for proper static analysis
- IDE autocompletion support
- PHPStan integration
- Regular updates with latest WooCommerce Product Add-Ons versions
📋 Requirements
- PHP >= 7.4
- Composer for dependency management
📦 Installation
Via Composer (Recommended)
# Install as a development dependency composer require --dev mralaminahamed/woocommerce-product-addons-stubs # Or specify a version composer require --dev mralaminahamed/woocommerce-product-addons-stubs:^1.0
Manual Installation
Download the stub files directly:
🔧 Basic Configuration
To use these stubs with PHPStan or your IDE, see our Usage Guide for detailed instructions.
🔍 Quick Usage Example
<?php // Your code will now have full IDE support $helper = new WC_Product_Addons_Helper(); // Constants are properly defined if (WC_PRODUCT_ADDONS_VERSION) { // Your implementation } // Classes and interfaces are available class MyAddon extends WC_Product_Addons_Helper { // Your implementation }
For advanced usage examples, see the Usage Guide.
📁 Package Structure
phpstan-woocommerce-product-addons-stubs/
├── configs/ # Configuration files for stub generation
├── docs/ # Detailed documentation
│ ├── usage.md # Usage guide
│ └── contributing.md # Contribution guidelines
├── woocommerce-product-addons-constants-stubs.php # Constants stub file
├── woocommerce-product-addons-stubs.php # Main stubs file with classes and functions
├── source/ # Source for generating stubs
└── tests/ # Test files
├── bootstrap.php # Test bootstrap
├── ConstantsTest.php # Constants tests
└── WooCommerceProductAddonsTest.php # WooCommerce Product Add-Ons tests
🛠 Development
For information on building stubs, running tests, and contributing to the project, please see our Contributing Guide.
📚 Documentation
For more detailed information, check out our documentation:
- Usage Guide
- Contributing Guide
- WooCommerce Product Add-Ons Documentation
- PHPStan Documentation
- PHP Stubs Generator Documentation
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- WooCommerce for the Product Add-Ons extension
- php-stubs/generator for the stub generation tools
- All contributors to this project
💬 Support
For bug reports and feature requests, please use the GitHub Issues.
For questions and discussions, please use the GitHub Discussions.