Automattic\WooCommerce\Internal\DataStores\Orders
CustomOrdersTableController::register_post_type_for_order_placeholders()
Handler for the woocommerce_after_register_post_type post, registers the post type for placeholder orders.
Method of the class: CustomOrdersTableController{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->register_post_type_for_order_placeholders(): void;
CustomOrdersTableController::register_post_type_for_order_placeholders() CustomOrdersTableController::register post type for order placeholders code WC 9.3.3
private 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, ) ); }