/** * Manage activations */ public function pages() { // Anything you need to do before a page is loaded do_action('woocommerce_grow_pages_start'); // Get current tab $current_tab = empty($_GET['tab']) ? 'dashboard' : sanitize_title($_GET['tab']); $this->add_woocommerce_grow_pages(); // Save settings if data has been posted if (!empty($_POST)) { $this->save($current_tab); } // Add any posted messages if (!empty($_GET['wc_grow_error'])) { WC_Admin_Settings::add_error(stripslashes($_GET['wc_error'])); } if (!empty($_GET['wc_grow_message'])) { WC_Admin_Settings::add_message(stripslashes($_GET['wc_message'])); } WC_Admin_Settings::show_messages(); // Add tabs on the Grow page $tabs = apply_filters('woocommerce_grow_page_tabs_array', array()); include 'views/html-grow-page.php'; }