HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: //proc/self/cwd/wp-content/plugins/woocommerce/src/Internal/Agentic/Enums/Specs/OrderStatus.php
<?php
declare(strict_types=1);
namespace Automattic\WooCommerce\Internal\Agentic\Enums\Specs;

/**
 * Order status values as defined in the Agentic Commerce Protocol.
 *
 * @since 10.3.0
 */
class OrderStatus {
	/**
	 * Order has been created.
	 */
	const CREATED = 'created';

	/**
	 * Order requires manual review.
	 */
	const MANUAL_REVIEW = 'manual_review';

	/**
	 * Order has been confirmed.
	 */
	const CONFIRMED = 'confirmed';

	/**
	 * Order has been canceled.
	 */
	const CANCELED = 'canceled';

	/**
	 * Order has been shipped.
	 */
	const SHIPPED = 'shipped';

	/**
	 * Order has been fulfilled.
	 */
	const FULFILLED = 'fulfilled';

	/**
	 * Get all valid order statuses.
	 *
	 * @return array Array of valid order status values.
	 */
	public static function get_all() {
		return array(
			self::CREATED,
			self::MANUAL_REVIEW,
			self::CONFIRMED,
			self::CANCELED,
			self::SHIPPED,
			self::FULFILLED,
		);
	}

	/**
	 * Check if a status is valid.
	 *
	 * @param string $status Status to check.
	 * @return bool True if valid, false otherwise.
	 */
	public static function is_valid( $status ) {
		return in_array( $status, self::get_all(), true );
	}
}