CatalogVisibility.php
11 months ago
FeaturePluginCompatibility.php
7 months ago
OrderInternalStatus.php
11 months ago
OrderStatus.php
7 months ago
PaymentGatewayFeature.php
9 months ago
ProductStatus.php
11 months ago
ProductStockStatus.php
11 months ago
ProductTaxStatus.php
11 months ago
ProductType.php
11 months ago
OrderStatus.php
110 lines
| 1 | <?php |
| 2 | |
| 3 | declare( strict_types = 1 ); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Enums; |
| 6 | |
| 7 | /** |
| 8 | * Enum class for all the order statuses. |
| 9 | * |
| 10 | * For a full documentation on the public order statuses, please refer to the following link: |
| 11 | * https://woocommerce.com/document/managing-orders/order-statuses/ |
| 12 | */ |
| 13 | final class OrderStatus { |
| 14 | /** |
| 15 | * The order has been received, but no payment has been made. |
| 16 | * |
| 17 | * @var string |
| 18 | */ |
| 19 | public const PENDING = 'pending'; |
| 20 | |
| 21 | /** |
| 22 | * The customer’s payment failed or was declined, and no payment has been successfully made. |
| 23 | * |
| 24 | * @var string |
| 25 | */ |
| 26 | public const FAILED = 'failed'; |
| 27 | |
| 28 | /** |
| 29 | * The order is awaiting payment confirmation. |
| 30 | * |
| 31 | * @var string |
| 32 | */ |
| 33 | public const ON_HOLD = 'on-hold'; |
| 34 | |
| 35 | /** |
| 36 | * Order fulfilled and complete. |
| 37 | * |
| 38 | * @var string |
| 39 | */ |
| 40 | public const COMPLETED = 'completed'; |
| 41 | |
| 42 | /** |
| 43 | * Payment has been received (paid), and the stock has been reduced. |
| 44 | * |
| 45 | * @var string |
| 46 | */ |
| 47 | public const PROCESSING = 'processing'; |
| 48 | |
| 49 | /** |
| 50 | * Orders are automatically put in the Refunded status when an admin or shop manager has fully refunded the order’s value after payment. |
| 51 | * |
| 52 | * @var string |
| 53 | */ |
| 54 | public const REFUNDED = 'refunded'; |
| 55 | |
| 56 | /** |
| 57 | * The order was canceled by an admin or the customer. |
| 58 | * |
| 59 | * @var string |
| 60 | */ |
| 61 | public const CANCELLED = 'cancelled'; |
| 62 | |
| 63 | /** |
| 64 | * The order is in the trash. |
| 65 | * |
| 66 | * @var string |
| 67 | */ |
| 68 | public const TRASH = 'trash'; |
| 69 | |
| 70 | /** |
| 71 | * The order is a draft (legacy status). |
| 72 | * |
| 73 | * @var string |
| 74 | */ |
| 75 | public const NEW = 'new'; |
| 76 | |
| 77 | /** |
| 78 | * The order is an automatically generated draft. |
| 79 | * |
| 80 | * @var string |
| 81 | */ |
| 82 | public const AUTO_DRAFT = 'auto-draft'; |
| 83 | |
| 84 | /** |
| 85 | * Draft orders are created when customers start the checkout process while the block version of the checkout is in place. |
| 86 | * |
| 87 | * @var string |
| 88 | */ |
| 89 | public const DRAFT = 'draft'; |
| 90 | |
| 91 | /** |
| 92 | * Checkout Draft orders are created when customers start the checkout process while the block version of the checkout is in place. |
| 93 | * |
| 94 | * @var string |
| 95 | */ |
| 96 | public const CHECKOUT_DRAFT = 'checkout-draft'; |
| 97 | |
| 98 | /** |
| 99 | * Array of all the valid order statuses for a complete payment. |
| 100 | * |
| 101 | * @var string[] |
| 102 | */ |
| 103 | public const PAYMENT_COMPLETE_STATUSES = array( |
| 104 | self::ON_HOLD, |
| 105 | self::PENDING, |
| 106 | self::FAILED, |
| 107 | self::CANCELLED, |
| 108 | ); |
| 109 | } |
| 110 |