Automattic\WooCommerce\Blocks\Domain\Services
DraftOrders::ensure_draft_status_registered
Since it's possible for third party code to clobber the $wp_post_statuses global, we need to do a final check here to make sure the draft post status is registered with the global so that it is not removed by WP_Query status validation checks.
Метод класса: DraftOrders{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->ensure_draft_status_registered();
Код DraftOrders::ensure_draft_status_registered() DraftOrders::ensure draft status registered WC 9.9.3
private function ensure_draft_status_registered() { $is_registered = get_post_stati( [ 'name' => self::DB_STATUS ] ); if ( empty( $is_registered ) ) { register_post_status( self::DB_STATUS, $this->get_post_status_properties() ); } }