PHPackages                             php-stubs/woocommerce-stubs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-stubs/woocommerce-stubs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-stubs/woocommerce-stubs
===========================

WooCommerce function and class declaration stubs for static analysis.

v10.9.1(1w ago)953.5M—3.9%9[2 issues](https://github.com/php-stubs/woocommerce-stubs/issues)20MITPHP

Since Nov 21Pushed 1w ago2 watchersCompare

[ Source](https://github.com/php-stubs/woocommerce-stubs)[ Packagist](https://packagist.org/packages/php-stubs/woocommerce-stubs)[ Docs](https://github.com/php-stubs/woocommerce-stubs)[ RSS](/packages/php-stubs-woocommerce-stubs/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (10)Versions (188)Used By (20)

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](https://github.com/szepeviktor/.github/raw/master/.github/assets/github-like-sponsor-button.svg)](https://github.com/sponsors/php-stubs)

Thank you!

WooCommerce Stubs
=================

[](#woocommerce-stubs)

[![Packagist stats](https://camo.githubusercontent.com/8bf1749b698ecf74818b54981af9a39f9c03df83f03e49f22922278f8f26b656/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d73747562732f776f6f636f6d6d657263652d73747562732e737667)](https://packagist.org/packages/php-stubs/woocommerce-stubs/stats)[![Packagist](https://camo.githubusercontent.com/5cc5a18946025205c8c9b2e1b02226ea07329c24f0ed717a490dbc12ddfbdb36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d73747562732f776f6f636f6d6d657263652d73747562732e7376673f636f6c6f723d344343363145267374796c653d706f706f7574)](https://packagist.org/packages/php-stubs/woocommerce-stubs)[![Tweet](https://camo.githubusercontent.com/f2c37423b05bb0697239f01a903bb61244243215e49041792283fa299469597a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54776565742d73686172652d6435643564353f7374796c653d736f6369616c266c6f676f3d74776974746572)](https://twitter.com/intent/tweet?text=https%3A%2F%2Fgithub.com%2Fphp-stubs%2Fwoocommerce-stubs&url=I%20use%20php-stubs%2Fwoocommerce-stubs%20for%20IDE%20completion%20and%20static%20analysis)[![Build Status](https://camo.githubusercontent.com/b8daaf73c3bbbec3e3e997dc79f0af7d2c862122d3c28c8eff7d03cc04e61f65/68747470733a2f2f6170702e7472617669732d63692e636f6d2f7068702d73747562732f776f6f636f6d6d657263652d73747562732e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/php-stubs/woocommerce-stubs)

This package provides stub declarations for the [WooCommerce plugin](https://wordpress.org/plugins/woocommerce/)functions, classes and interfaces. These stubs can help plugin and theme developers leverage IDE completion and static analysis tools like [PHPStan](https://github.com/phpstan/phpstan).

The stubs are generated directly from the [source](https://github.com/woocommerce/woocommerce)using [php-stubs/generator](https://github.com/php-stubs/generator).

Requirements
------------

[](#requirements)

- PHP &gt;=7.1

Installation
------------

[](#installation)

Require this package as a development dependency with [Composer](https://getcomposer.org).

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

Alternatively you may download `woocommerce-stubs.php` directly.

Usage in PHPStan
----------------

[](#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
---------------------------

[](#support-package-maintenance)

Please consider supporting this work.

[![Sponsor](https://github.com/szepeviktor/.github/raw/master/.github/assets/github-like-sponsor-button.svg)](https://github.com/sponsors/php-stubs)

Thank you!

###  Health Score

69

—

FairBetter than 99% of packages

Maintenance98

Actively maintained with recent releases

Popularity57

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~21 days

Total

187

Last Release

9d ago

Major Versions

v5.9.1 → v6.0.12022-04-30

v6.9.4 → v7.0.02022-10-12

v7.9.0 → v8.0.12023-08-09

v8.9.1 → v9.0.02024-06-18

v9.9.5 → v10.0.22025-07-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/135d8104cdf926e2b15b6a06413153a9582729f0cd48ccba7bc7e62878a39781?d=identicon)[szepeviktor](/maintainers/szepeviktor)

---

Top Contributors

[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (228 commits)")[![the-csaba](https://avatars.githubusercontent.com/u/45931795?v=4)](https://github.com/the-csaba "the-csaba (8 commits)")[![dennisameling](https://avatars.githubusercontent.com/u/17739158?v=4)](https://github.com/dennisameling "dennisameling (1 commits)")

---

Tags

definitionsphpstanstatic-analysisstubswoocommercewordpressPHPStanwordpressstatic analysiswoocommerce

### Embed Badge

![Health badge](/badges/php-stubs-woocommerce-stubs/health.svg)

```
[![Health](https://phpackages.com/badges/php-stubs-woocommerce-stubs/health.svg)](https://phpackages.com/packages/php-stubs-woocommerce-stubs)
```

###  Alternatives

[php-stubs/wordpress-stubs

WordPress function and class declaration stubs for static analysis.

20416.0M415](/packages/php-stubs-wordpress-stubs)[php-stubs/wp-cli-stubs

WP-CLI function and class declaration stubs for static analysis.

302.9M136](/packages/php-stubs-wp-cli-stubs)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

497.5M54](/packages/woocommerce-woocommerce-sniffs)[php-stubs/wordpress-globals

Global variables and global constants from WordPress core.

14881.1k21](/packages/php-stubs-wordpress-globals)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
