ActionScheduler_AdminView::register_menu
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.
Method of the class: ActionScheduler_AdminView{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ActionScheduler_AdminView = new ActionScheduler_AdminView(); $ActionScheduler_AdminView->register_menu();
ActionScheduler_AdminView::register_menu() ActionScheduler AdminView::register menu code WC 10.5.0
public function register_menu() {
$hook_suffix = add_submenu_page(
'tools.php',
__( 'Scheduled Actions', 'woocommerce' ),
__( 'Scheduled Actions', 'woocommerce' ),
'manage_options',
'action-scheduler',
array( $this, 'render_admin_ui' )
);
add_action( 'load-' . $hook_suffix, array( $this, 'process_admin_ui' ) );
}