render(); } /** * Registers action-scheduler into WooCommerce > System status. * * @param array $tabs An associative array of tab key => label. * @return array $tabs An associative array of tab key => label, including Action Scheduler's tabs */ public function register_system_status_tab( array $tabs ) { $tabs['action-scheduler'] = __( 'Scheduled Actions', 'woocommerce' ); return $tabs; } /** * Include Action Scheduler's administration under the Tools menu. * * A menu under the Tools menu is important for backward compatibility (as that's * where it started), and also provides more convenient access than the WooCommerce * System Status page, and for sites where WooCommerce isn't active. */ public function register_menu() { add_submenu_page( 'tools.php', __( 'Scheduled Actions', 'woocommerce' ), __( 'Scheduled Actions', 'woocommerce' ), 'manage_options', 'action-scheduler', array( $this, 'render_admin_ui' ) ); } /** * Renders the Admin UI */ public function render_admin_ui() { $table = new ActionScheduler_ListTable( ActionScheduler::store(), ActionScheduler::logger(), ActionScheduler::runner() ); $table->display_page(); } }