WC_Settings_Integrations::get_own_sections()protectedWC 1.0

Get own sections.

Метод класса: WC_Settings_Integrations{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_own_sections();

Код WC_Settings_Integrations::get_own_sections() WC 8.7.0

protected function get_own_sections() {
	global $current_section;

	$sections = array();

	if ( ! $this->wc_is_installing() ) {
		$integrations = $this->get_integrations();

		if ( ! $current_section && ! empty( $integrations ) ) {
			$current_section = current( $integrations )->id;
		}

		if ( count( $integrations ) > 1 ) {
			foreach ( $integrations as $integration ) {
				$title                                      = empty( $integration->method_title ) ? ucfirst( $integration->id ) : $integration->method_title;
				$sections[ strtolower( $integration->id ) ] = esc_html( $title );
			}
		}
	}

	return $sections;
}