Automattic\WooCommerce\Internal\DataStores\Orders

CustomOrdersTableController::register_post_type_for_order_placeholders()publicWC 1.0

Handler for the woocommerce_after_register_post_type post, registers the post type for placeholder orders.

Метод класса: CustomOrdersTableController{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$CustomOrdersTableController = new CustomOrdersTableController();
$CustomOrdersTableController->register_post_type_for_order_placeholders(): void;

Код CustomOrdersTableController::register_post_type_for_order_placeholders() WC 9.7.1

public function register_post_type_for_order_placeholders(): void {
	wc_register_order_type(
		DataSynchronizer::PLACEHOLDER_ORDER_POST_TYPE,
		array(
			'public'                           => false,
			'exclude_from_search'              => true,
			'publicly_queryable'               => false,
			'show_ui'                          => false,
			'show_in_menu'                     => false,
			'show_in_nav_menus'                => false,
			'show_in_admin_bar'                => false,
			'show_in_rest'                     => false,
			'rewrite'                          => false,
			'query_var'                        => false,
			'can_export'                       => false,
			'supports'                         => array(),
			'capabilities'                     => array(),
			'exclude_from_order_count'         => true,
			'exclude_from_order_views'         => true,
			'exclude_from_order_reports'       => true,
			'exclude_from_order_sales_reports' => true,
		)
	);
}