PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / classes / order-status / active.php

active.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/classes/order-status/active.php

44 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace StoreEngine\Classes\OrderStatus;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 use StoreEngine\Classes\Exceptions\StoreEngineInvalidArgumentException;
10 use StoreEngine\Classes\OrderContext;
11 use StoreEngine\Interfaces\OrderStatus;
12
13 class Active implements OrderStatus {
14 const STATUS = 'active';
15
16 public function proceed_to_next_status( OrderContext $context, string $trigger = '' ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed
17 throw new StoreEngineInvalidArgumentException(
18 sprintf(
19 /* translators: %1$s. Current status, %2$s. Requested status transition. */
20 esc_html__( 'Invalid transition from %1$s to %2$s', 'storeengine' ),
21 esc_html( self::STATUS ),
22 esc_html( $trigger )
23 ),
24 'invalid-status-transition'
25 );
26 }
27
28 public function get_status(): string {
29 return self::STATUS;
30 }
31
32 public function get_status_title(): string {
33 return __( 'Active', 'storeengine' );
34 }
35
36 public function get_possible_next_statuses(): array {
37 return [];
38 }
39
40 public function get_possible_triggers(): array {
41 return [];
42 }
43 }
44