WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Blocks\Domain\Services

DraftOrders::init() public WC 1.0

Set all hooks related to adding Checkout Draft order functionality to Woo Core.

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

Хуков нет.

Возвращает

null. Null. Ничего.

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

$DraftOrders = new DraftOrders();
$DraftOrders->init();

Код DraftOrders::init() WC 5.1.0

<?php
public function init() {
	if ( $this->package->feature()->is_feature_plugin_build() ) {
		add_filter( 'wc_order_statuses', [ $this, 'register_draft_order_status' ] );
		add_filter( 'woocommerce_register_shop_order_post_statuses', [ $this, 'register_draft_order_post_status' ] );
		add_filter( 'woocommerce_analytics_excluded_order_statuses', [ $this, 'append_draft_order_post_status' ] );
		add_filter( 'woocommerce_valid_order_statuses_for_payment', [ $this, 'append_draft_order_post_status' ] );
		add_filter( 'woocommerce_valid_order_statuses_for_payment_complete', [ $this, 'append_draft_order_post_status' ] );
		// Hook into the query to retrieve My Account orders so draft status is excluded.
		add_action( 'woocommerce_my_account_my_orders_query', [ $this, 'delete_draft_order_post_status_from_args' ] );
		add_action( 'woocommerce_cleanup_draft_orders', [ $this, 'delete_expired_draft_orders' ] );
		add_action( 'admin_init', [ $this, 'install' ] );
	} else {
		// Maybe remove existing cronjob if present because it shouldn't be needed in the environment.
		add_action( 'admin_init', [ $this, 'uninstall' ] );
	}
}