' . esc_html__('Quick Setup', 'mage-eventpress') . '', 'manage_options', 'mpwem_quick_setup', array($this, 'quick_setup')); add_submenu_page('mep_events', esc_html__('Quick Setup', 'mage-eventpress'), '' . esc_html__('Quick Setup', 'mage-eventpress') . '', 'manage_options', 'mpwem_quick_setup', array($this, 'quick_setup')); } else { add_menu_page(esc_html__('Events', 'mage-eventpress'), esc_html__('Events', 'mage-eventpress'), 'manage_options', 'mep_events', array($this, 'quick_setup'), 'dashicons-calendar-alt', 6); add_submenu_page('mep_events', esc_html__('Quick Setup', 'mage-eventpress'), '' . esc_html__('Quick Setup', 'mage-eventpress') . '', 'manage_options', 'mpwem_quick_setup', array($this, 'quick_setup')); } } public function quick_setup() { $status = MP_Global_Function::check_woocommerce(); if (isset($_POST['active_woo_btn'])) { ?> '; include_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); include_once(ABSPATH . 'wp-admin/includes/file.php'); include_once(ABSPATH . 'wp-admin/includes/misc.php'); include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'); $plugin = 'woocommerce'; $api = plugins_api('plugin_information', array( 'slug' => $plugin, 'fields' => array( 'short_description' => false, 'sections' => false, 'requires' => false, 'rating' => false, 'ratings' => false, 'downloaded' => false, 'last_updated' => false, 'added' => false, 'tags' => false, 'compatibility' => false, 'homepage' => false, 'donate_link' => false, ), )); $title = 'title'; $url = 'url'; $nonce = 'nonce'; $woocommerce_plugin = new Plugin_Upgrader(new Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api'))); $woocommerce_plugin->install($api->download_link); activate_plugin('woocommerce/woocommerce.php'); //MPTBM_Plugin::on_activation_page_create(); echo ''; ?> $label, 'mep_event_slug' => $slug, 'mep_event_expire_on_datetimes' => $event_expire_on ]; $update_email_settings_arr = [ 'mep_email_form_name' => $email_from_name, 'mep_email_form_email' => $email_from_addrss ]; $new_general_settings_data = is_array($general_settings_data) ? array_replace($general_settings_data, $update_general_settings_arr) : $update_general_settings_arr; $new_email_settings_data = is_array($email_settings_data) ? array_replace($email_settings_data, $update_email_settings_arr) : $update_email_settings_arr; update_option('general_setting_sec', $new_general_settings_data); update_option('email_setting_sec', $new_email_settings_data); update_option('mep_quick_setup', 'done'); wp_redirect(admin_url('edit.php?post_type=mep_events')); } ?>

1

2

3

setup_welcome_content(); $this->setup_general_content(); $this->setup_content_done(); ?>

Permalinks hit the Save Settings button', 'mage-eventpress'); ?>