/** * Include the settings page classes */ public static function get_settings_pages() { if (empty(self::$settings)) { $settings = array(); include_once WC()->plugin_path() . '/includes/admin/settings/class-wc-settings-page.php'; $settings[] = (include 'settings/wc-crm-settings-general.php'); $settings[] = (include 'settings/wc-crm-settings-order-page.php'); $settings[] = (include 'settings/wc-crm-settings-newsletter.php'); $settings[] = (include 'settings/wc-crm-settings-statuses.php'); self::$settings = apply_filters('wc_crm_get_settings_pages', $settings); } return self::$settings; }
/** * Renders CRM Settings page. */ function wc_customer_relationship_manager_render_settings_page() { include_once 'classes/wc_crm_settings.php'; $crm_settings = new WC_Crm_Settings(); $crm_settings->output(); }
/** * Save settings */ public function save() { $settings = $this->get_settings(); WC_Crm_Settings::save_fields($settings); }