e_id, $is_enabled ): void { if ( 'custom_order_tables' !== $feature_id || ! $is_enabled ) { return; } if ( ! $this->data_synchronizer->check_orders_table_exists() ) { update_option( DataSynchronizer::ORDERS_DATA_SYNC_ENABLED_OPTION, 'no' ); $this->create_custom_orders_tables( false ); } } /** * Handler for the woocommerce_after_register_post_type post, * registers the post type for placeholder orders. * * @return void */ 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, ) ); } }