PHPackages                             phpro/mage2-module-sales-state-events - 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. phpro/mage2-module-sales-state-events

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

phpro/mage2-module-sales-state-events
=====================================

Adds events for state changes for orders, invoices and credit memos

4.1.0(4y ago)251.6k↓29.3%3[1 issues](https://github.com/phpro/phpro-mage2-module-sales-state-events/issues)[1 PRs](https://github.com/phpro/phpro-mage2-module-sales-state-events/pulls)MITPHPPHP ^7.1 || ^8.0CI failing

Since Jul 31Pushed 4y ago4 watchersCompare

[ Source](https://github.com/phpro/phpro-mage2-module-sales-state-events)[ Packagist](https://packagist.org/packages/phpro/mage2-module-sales-state-events)[ RSS](/packages/phpro-mage2-module-sales-state-events/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

[![](https://github.com/phpro/phpro-mage2-module-sales-state-events/workflows/.github/workflows/grumphp.yml/badge.svg)](https://github.com/phpro/phpro-mage2-module-sales-state-events/workflows/.github/workflows/grumphp.yml/badge.svg)

Sales State Events for Magento 2
================================

[](#sales-state-events-for-magento-2)

This Magento module will add new events for the Magento Sales module. The events are based on state and status changes on orders, invoices and credit memos.

This makes it easier to trigger custom functionality based on state changes.

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

[](#installation)

```
composer require phpro/mage2-module-sales-state-events

```

Key features
------------

[](#key-features)

### Order

[](#order)

Events will be dispatched after an order is successfully saved with a new state or with a new status. It will create events for all statuses, standard or configured.

An event with the new state/status name will be dispatched, for example:

- sales\_order\_state\_new
- sales\_order\_state\_complete
- sales\_order\_status\_pending\_payment
- sales\_order\_status\_new

An event with the new state/status name and the former state/status name will be dispatched, for example:

- sales\_order\_state\_complete\_to\_closed
- sales\_order\_state\_new\_to\_canceled
- sales\_order\_status\_new\_to\_canceled
- sales\_order\_status\_processing\_to\_fraud

An event with the (new) state name and the (new) status will be dispatched, for example:

- sales\_order\_state\_new\_status\_authorized
- sales\_order\_state\_processing\_status\_fraud

### Invoice

[](#invoice)

Events will be dispatched after an invoice is successfully saved with a new state.

An event with the new state name will be dispatched, for example:

- sales\_order\_invoice\_state\_canceled
- sales\_order\_invoice\_state\_paid

An event with the new state name and the former state name will be dispatched, for example:

- sales\_order\_invoice\_state\_pending\_to\_paid
- sales\_order\_invoice\_state\_pending\_to\_canceled

### Credit Memo

[](#credit-memo)

Events will be dispatched after a credit memo is successfully saved with a new state.

An event with the new state name will be dispatched, for example:

- sales\_order\_creditmemo\_state\_canceled
- sales\_order\_creditmemo\_state\_refunded

An event with the new state name and the former state name will be dispatched, for example:

- sales\_order\_creditmemo\_state\_pending\_to\_refunded
- sales\_order\_creditmemo\_state\_pending\_to\_canceled

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~325 days

Total

3

Last Release

1513d ago

Major Versions

3.0.0 → 4.0.02020-09-25

PHP version history (2 changes)3.0.0PHP ^7.1

4.1.0PHP ^7.1 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![siebdc2](https://avatars.githubusercontent.com/u/104489060?v=4)](https://github.com/siebdc2 "siebdc2 (3 commits)")[![vrielsa](https://avatars.githubusercontent.com/u/33426821?v=4)](https://github.com/vrielsa "vrielsa (3 commits)")[![lykciv](https://avatars.githubusercontent.com/u/3390098?v=4)](https://github.com/lykciv "lykciv (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpro-mage2-module-sales-state-events/health.svg)

```
[![Health](https://phpackages.com/badges/phpro-mage2-module-sales-state-events/health.svg)](https://phpackages.com/packages/phpro-mage2-module-sales-state-events)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

244.8k2](/packages/zwernemann-module-withdrawal)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)[aune-io/magento2-autoinvoice

Automatically invoice all complete orders in your Magento 2 store

3654.0k](/packages/aune-io-magento2-autoinvoice)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)

PHPackages © 2026

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