PHPackages                             woocommerce/woocommerce-example-package - 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. woocommerce/woocommerce-example-package

AbandonedArchivedWordpress-plugin

woocommerce/woocommerce-example-package
=======================================

Example feature plugin package for WooCommerce.

v1.0.0(6y ago)872GPL-3.0-or-laterShell

Since Jun 25Pushed 6y agoCompare

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

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

WooCommerce Example Package
===========================

[](#woocommerce-example-package)

This is an example feature plugin package for WooCommerce. It is setup so that it can be installed standalone as a WordPress plugin, or included into another project/WooCommerce core as a Composer Package.

Installing Composer
-------------------

[](#installing-composer)

You need Composer to use the packages. If you don't have it installed, go and check how to [install Composer](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment) and then continue here.

Installing packages
-------------------

[](#installing-packages)

Once you have defined your package requirements, run

```
composer install

```

and that will install the required Composer packages.

The example package has some package requirements defined:

- `"automattic/jetpack-autoloader"` - Handles autoloading and prevents version conflicts between packages.
- `"composer/installers"` - Allows the plugin to be installed via composer and moved to the correct install directory.
- `"phpunit/phpunit"` - Runs unit tests.
- `"woocommerce/woocommerce-sniffs"` - Checks for coding standards violations.

Main directories and files
--------------------------

[](#main-directories-and-files)

- `woocommerce-example-package.php` - The main plugin file. ONLY used when using this package as a plugin!
- `src/` - PSR-4 named classes under your namespace are placed here. Classes will be autoloaded.
- `src/Package.php` - The package class requires 3 static methods;
    - `init` - Init your package. If it needs to hook into WordPress, do so here.
    - `get_version` - Return the version of your package here. This will be used by WooCommerce in the system status report.
    - `get_path` - Return the package main directory. This will be used by WooCommerce in the system status report.
- `tests/` - Unit tests ran using `phpunit`.

Adding and running unit tests
-----------------------------

[](#adding-and-running-unit-tests)

Tests should be added in the `tests/Tests` directory.

You can run the tests by running the command

```
./vendor/bin/phpunit

```

from the plugin directory.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2518d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1f9b32f9677791fbef38b00c9225e05800f525b3b13872b118fd344a58350a0?d=identicon)[woocommerce](/maintainers/woocommerce)

![](https://www.gravatar.com/avatar/8295774fc174b6a5b9bd960709949f4de88cd0b8708d711dc5b6676693d41432?d=identicon)[mikejolley](/maintainers/mikejolley)

---

Top Contributors

[![mikejolley](https://avatars.githubusercontent.com/u/90977?v=4)](https://github.com/mikejolley "mikejolley (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/woocommerce-woocommerce-example-package/health.svg)

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

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)[wp-pay-extensions/gravityforms

Gravity Forms driver for the WordPress payment processing library.

1133.3k2](/packages/wp-pay-extensions-gravityforms)

PHPackages © 2026

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