PHPackages                             corcel/woocommerce - 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. [API Development](/categories/api)
4. /
5. corcel/woocommerce

ActiveLibrary[API Development](/categories/api)

corcel/woocommerce
==================

WooCommerce plugin for Corcel

v6.0.0(1y ago)11033.8k↓63.8%30[6 issues](https://github.com/corcel/woocommerce/issues)[1 PRs](https://github.com/corcel/woocommerce/pulls)MITPHPPHP ^8.2CI passing

Since Oct 4Pushed 1y ago8 watchersCompare

[ Source](https://github.com/corcel/woocommerce)[ Packagist](https://packagist.org/packages/corcel/woocommerce)[ Docs](http://github.com/corcel/woocommerce)[ RSS](/packages/corcel-woocommerce/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (9)Versions (22)Used By (0)

 [![Corcel WooCommerce logo](https://raw.githubusercontent.com/corcel/woocommerce/master/.github/logo.jpg)](https://raw.githubusercontent.com/corcel/woocommerce/master/.github/logo.jpg)

**A collection of Laravel models for WooCommerce.**

This plugin extends base [Corcel](https://github.com/corcel/corcel) package and allows fetching WooCommerce data from WordPress database. Currently this plugin implements the following models:

- [Customer](#customer-model) - wrapper for User model
- [Order](#order-model) - wrapper for Post model
- [Product](#product-model) - wrapper for Post model
- [Item](#item-model)
- Product Category - wrapper for Taxonomy model
- Product Tag - wrapper for Taxonomy model
- Product Attribute - helper model for getting product attributes (should not be used directly)
- Product Type - helper model for getting product types (should not be used directly)

Some meta values are collected into helper classes:

- [BillingAddress](#billingaddress-helper) - helper for customer and order billing address
- [ShippingAddress](#shippingaddress-helper) - helper for customer and order shipping address
- [Payment](#payment-helper) - helper for order payment

Compatibility list
------------------

[](#compatibility-list)

Corcel WooCommerceLaravelPHP versionSupported6.x (master)11.x, 12.x&gt;= 8.2✅[5.x](https://github.com/corcel/woocommerce/tree/5.x)10.x, 11.x&gt;= 8.2✅[4.x](https://github.com/corcel/woocommerce/tree/4.x)10.x&gt;= 8.1❌[3.x](https://github.com/corcel/woocommerce/tree/3.x)9.x&gt;= 8.0.3❌[2.x](https://github.com/corcel/woocommerce/tree/2.x)6.x, 7.x, 8.x&gt;= 7.3 | 8.0❌[1.x](https://github.com/corcel/woocommerce/tree/1.x)6.x, 7.x&gt;= 7.2❌Installation
------------

[](#installation)

```
composer require corcel/woocommerce
```

Models list
-----------

[](#models-list)

### Customer model

[](#customer-model)

#### Get customer by id

[](#get-customer-by-id)

```
$customer = Customer::find(1);
```

#### Customer relation

[](#customer-relation)

```
$customer = Customer::find(1);

$customerOrders = $customer->orders;
```

#### Customer properties

[](#customer-properties)

```
$customer = Customer::find(1);

$customer->order_count;      // e.g. 10
$customer->billing_address;  // \Corcel\WooCommerce\Support\BillingAddress class instance
$customer->shipping_address; // \Corcel\WooCommerce\Support\ShippingAddress class instance
```

### Order model

[](#order-model)

#### Get order by id

[](#get-order-by-id)

```
$order = Order::find(1);
```

#### Get completed orders

[](#get-completed-orders)

```
$completedOrders = Order::completed()->get();
```

*For other statuses methods please check [OrderBuilder.php](src/Model/Builder/OrderBuilder.php).*

#### Order relations

[](#order-relations)

```
$order = Order::find(1);

$orderItems    = $order->items;
$orderCustomer = $order->customer;
```

#### Order properties

[](#order-properties)

```
$order = Order::find(1);

$order->currency;         // e.g. EUR
$order->total;            // e.g. 10.20
$order->tax;              // e.g. 0.50
$order->shipping_tax;     // e.g. 0.20
$order->status;           // e.g. completed
$order->date_completed;   // e.g. 2020-06-01 10:00:00
$order->date_paid;        // e.g. 2020-06-01 10:00:00
$order->payment;          // \Corcel\WooCommerce\Support\Payment class instance
$order->billing_address;  // \Corcel\WooCommerce\Support\BillingAddress class instance
$order->shipping_address; // \Corcel\WooCommerce\Support\ShippingAddress class instance
```

### Item model

[](#item-model)

#### Get item by id

[](#get-item-by-id)

```
$item = Item::find(1);
```

#### Item relations

[](#item-relations)

```
$item = Item::find(1);

$itemOrder   = $item->order;
$itemProduct = $item->product;
```

#### Item properties

[](#item-properties)

```
$item = Item::find(1);

$item->order_item_id;
$item->order_item_name;
$item->order_item_type;
$item->order_id;
$item->product_id;
$item->variation_id;
$item->quantity;          // e.g. 2
$item->tax_class;
$item->line_subtotal;     // e.g. 5.50
$item->line_subtotal_tax; // e.g. 0.50
$item->line_total;        // e.g. 10.50
$item->line_tax;          // e.g. 2.00
```

### Product model

[](#product-model)

#### Get product by id

[](#get-product-by-id)

```
$product = Product::find(1);
```

#### Product relations

[](#product-relations)

```
$product = Product::find(1);

$product->categories;
$product->items;
$product->tags;
```

#### Product properties

[](#product-properties)

```
$product = Product::find(1);

$product->price;
$product->regular_price;
$product->sale_price;
$product->on_sale;
$product->sku;
$product->tax_status;
$product->is_taxable;
$product->weight;
$product->length;
$product->width;
$product->height;
$product->is_virtual;
$product->is_downloadable;
$product->stock;
$product->in_stock;
$product->type;
$product->attributes; // Collection of (variation) attributes
$product->crosssells; // Collection of cross-sell products
$product->upsells;    // Collection of up-sell products
$product->gallery;    // Collection of gallery attachments
```

Helper classes list
-------------------

[](#helper-classes-list)

### BillingAddress helper

[](#billingaddress-helper)

This class collects customer and order meta related to billing address.

```
$order   = Order::find(1);
$address = $order->billingAddress;

$address->first_name;
$address->last_name;
$address->company;
$address->address_1;
$address->address_2;
$address->city;
$address->state;
$address->postcode;
$address->country;
$address->email;
$address->phone;
```

### ShippingAddress helper

[](#shippingaddress-helper)

This class collects customer and order meta related to billing address.

```
$order   = Order::find(1);
$address = $order->shippingAddress;

$address->first_name;
$address->last_name;
$address->company;
$address->address_1;
$address->address_2;
$address->city;
$address->state;
$address->postcode;
$address->country;
```

### Payment helper

[](#payment-helper)

This class collects order meta related to payment.

```
$order   = Order::find(1);
$payment = $order->payment;

$payment->method;
$payment->method_title;
$payment->transaction_id;
```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance45

Moderate activity, may be stable

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 89.9% 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 ~83 days

Recently: every ~172 days

Total

21

Last Release

406d ago

Major Versions

1.x-dev → v2.1.02021-10-21

v2.1.1 → v3.0.02022-06-25

3.x-dev → v4.0.02023-06-12

4.x-dev → v5.0.02024-05-15

5.x-dev → v6.0.02025-04-29

PHP version history (6 changes)v1.0.0PHP ^7.2

v2.0.0PHP ^7.3

v2.1.0PHP ^7.3|^8.0

v3.0.0PHP ^8.0.3

v4.0.0PHP ^8.1

v5.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1175275?v=4)[Junior Grossi](/maintainers/jgrossi)[@jgrossi](https://github.com/jgrossi)

---

Top Contributors

[![Dartui](https://avatars.githubusercontent.com/u/2657856?v=4)](https://github.com/Dartui "Dartui (71 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![joshbonnick](https://avatars.githubusercontent.com/u/69632116?v=4)](https://github.com/joshbonnick "joshbonnick (1 commits)")[![geraint-kaweb](https://avatars.githubusercontent.com/u/117999050?v=4)](https://github.com/geraint-kaweb "geraint-kaweb (1 commits)")[![rowino](https://avatars.githubusercontent.com/u/2177704?v=4)](https://github.com/rowino "rowino (1 commits)")[![Stevemoretz](https://avatars.githubusercontent.com/u/27680142?v=4)](https://github.com/Stevemoretz "Stevemoretz (1 commits)")[![twmbx](https://avatars.githubusercontent.com/u/536306?v=4)](https://github.com/twmbx "twmbx (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[rapidez/core

Rapidez Core

1822.4k65](/packages/rapidez-core)

PHPackages © 2026

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