# storeengine/2.2.0/includes/classes/order-status/processing.php

StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates &amp; More, version 2.2.0. 69 lines.

- Page: https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/classes/order-status/processing.php
- Raw: https://pluginprobe.com/plugins/storeengine/2.2.0/raw/includes/classes/order-status/processing.php
- Modified: 2026-01-25T13:29:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/classes/order-status/processing.php#L10-L20`.

```php
<?php

namespace StoreEngine\Classes\OrderStatus;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use StoreEngine\Classes\Exceptions\StoreEngineInvalidArgumentException;
use StoreEngine\Classes\OrderContext;
use StoreEngine\Interfaces\OrderStatus;

class Processing implements OrderStatus {
	const STATUS = 'processing';

	public function proceed_to_next_status( OrderContext $context, string $trigger = '' ) {
		switch ( $trigger ) {
			case 'completed':
				$context->set_order_status( new Completed() );
				break;
			case 'payment_confirm':
				$context->set_order_status( new PaymentConfirmed() );
				break;
			case 'payment_fail':
				$context->set_order_status( new PaymentFailed() );
				break;
			case 'cancel':
				$context->set_order_status( new Cancelled() );
				break;
			default:
				throw new StoreEngineInvalidArgumentException(
					sprintf(
					/* translators: %1$s. Requested status transition, %2$s. Current Status */
						esc_html__( 'Invalid trigger (%1$s) for next status from %2$s', 'storeengine' ),
						esc_html( self::STATUS ),
						esc_html( $trigger )
					),
					'invalid-trigger'
				);
		}
	}

	public function get_status(): string {
		return self::STATUS;
	}

	public function get_status_title(): string {
		return __( 'Processing', 'storeengine' );
	}

	public function get_possible_next_statuses(): array {
		return [
			Completed::STATUS,
			PaymentConfirmed::STATUS,
			PaymentFailed::STATUS,
			Cancelled::STATUS,
		];
	}

	public function get_possible_triggers(): array {
		return [
			'completed',
			'payment_confirm',
			'payment_fail',
			'cancel',
		];
	}
}

```
