woocommerce_wpml = $woocommerce_wpml; } public function add_hooks(){ if ( current_user_can( 'manage_options' ) && $this->is_wcml_setup_page() ) { add_action( 'admin_menu', array( $this, 'admin_menus' ) ); } } public function add_wizard_notice_hook(){ add_filter( 'admin_notices', array( $this, 'wizard_notice' ) ); } /** * @return bool */ private function is_wcml_setup_page() { return isset( $_GET['page'] ) && $_GET['page'] === 'wcml-setup'; } public function admin_menus() { add_dashboard_page( '', '', 'manage_options', 'wcml-setup', '' ); } /** * @param array $steps * @param string $step */ public function setup_header( $steps, $step ) { set_current_screen( 'wcml-setup' ); $header = new WCML_Setup_Header_UI( $steps, $step ); echo $header->get_view(); } /** * @param array $steps * @param string $current_step */ public function setup_steps( array $steps, $current_step ) { $step_keys = array_keys( $steps ); array_shift( $steps ); ?>