Automattic\WooCommerce\Blocks\Domain\Services

DraftOrders::register_draft_order_status()publicWC 1.0

Register custom order status for orders created via the API during checkout.

Draft order status is used before payment is attempted, during checkout, when a cart is converted to an order.

{} Это метод класса: DraftOrders{}

Хуков нет.

Возвращает

Массив.

Использование

$DraftOrders = new DraftOrders();
$DraftOrders->register_draft_order_status( $statuses );
$statuses(массив) (обязательный)
Array of statuses.

Код DraftOrders::register_draft_order_status() WC 6.9.4

public function register_draft_order_status( array $statuses ) {
	$statuses[ self::DB_STATUS ] = _x( 'Draft', 'Order status', 'woocommerce' );
	return $statuses;
}