id ] = $this->label; return $pages; } /** * Get settings array * * @return array */ public function get_settings() { return array(); } /** * Get sections * * @return array */ public function get_sections() { return apply_filters( 'woocommerce_get_sections_' . $this->id, array() ); } /** * Output sections */ public function output_sections() { global $current_section; $sections = $this->get_sections(); if ( empty( $sections ) ) return; echo '
'; } /** * Output the settings */ public function output() { $settings = $this->get_settings(); WC_Admin_Settings::output_fields( $settings ); } /** * Save settings */ public function save() { global $current_section; $settings = $this->get_settings(); WC_Admin_Settings::save_fields( $settings ); if ( $current_section ) do_action( 'woocommerce_update_options_' . $this->id . '_' . $current_section ); } } endif;