public function displaySkuGenPage() { // handle actions and show notes // $this->handleActions(); // handle button if ($this->requestAction() == 'wpla_generate_all_missing_skus') { $product_ids = WPLA_SkuGenerator::getAllProductIDsWithoutSKU(); $this->generateNewSKUs($product_ids); } // handle bulk action if ($this->requestAction() == 'wpla_bulk_generate_skus') { $this->generateNewSKUs($_REQUEST['product']); } // save options if ($this->requestAction() == 'wpla_save_skugen_options') { $this->saveSkuGenOptions(); } // create table and fetch items to show $this->skugenTable = new WPLA_SkuGenTable(); $this->skugenTable->prepare_items(); $active_tab = 'skugen'; $aData = array('plugin_url' => self::$PLUGIN_URL, 'message' => $this->message, 'skugenTable' => $this->skugenTable, 'default_account' => get_option('wpla_default_account_id'), 'skugen_mode_simple' => get_option('wpla_skugen_mode_simple'), 'skugen_mode_variation' => get_option('wpla_skugen_mode_variation'), 'skugen_mode_case' => get_option('wpla_skugen_mode_case'), 'tools_url' => 'admin.php?page=' . self::ParentMenuId . '-tools', 'form_action' => 'admin.php?page=' . self::ParentMenuId . '-tools' . '&tab=' . $active_tab); $this->display('tools_skugen', $aData); }