php-stubs/woocommerce-stubs

WooCommerce function and class declaration stubs for static analysis.

Maintainers

👁 szepeviktor

Package info

github.com/php-stubs/woocommerce-stubs

pkg:composer/php-stubs/woocommerce-stubs

Statistics

Installs: 3 492 312

Dependents: 66

Suggesters: 0

Stars: 95

Open Issues: 3

v10.9.1 2026-06-25 10:47 UTC

Requires

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT e6d583b9fa05b3f5ff67f86c939b45a0c35b8444

wordpressstatic analysiswoocommercePHPStan

This package is auto-updated.

Last update: 2026-06-25 10:49:09 UTC


README

Important

Hello everyone! This is Viktor who runs the php-stubs organization. I am planning to stop contributing to the WordPress ecosystem because it is extremely difficult and I do not earn (min) €100/month.

Please support my work to avoid abandoning this package.

👁 Sponsor

Thank you!

WooCommerce Stubs

👁 Packagist stats
👁 Packagist
👁 Tweet
👁 Build Status

This package provides stub declarations for the WooCommerce plugin functions, classes and interfaces. These stubs can help plugin and theme developers leverage IDE completion and static analysis tools like PHPStan.

The stubs are generated directly from the source using php-stubs/generator.

Requirements

  • PHP >=7.1

Installation

Require this package as a development dependency with Composer.

composer require --dev php-stubs/woocommerce-stubs

Alternatively you may download woocommerce-stubs.php directly.

Usage in PHPStan

Include stubs in PHPStan configuration file.

parameters:
 bootstrapFiles:
 - vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
 #- vendor/php-stubs/woocommerce-stubs/woocommerce-packages-stubs.php

Support package maintenance

Please consider supporting this work.

👁 Sponsor

Thank you!