WC_Settings_Advanced::get_own_sectionsprotectedWC 1.0

Get own sections.

Method of the class: WC_Settings_Advanced{}

No Hooks.

Returns

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_own_sections();

WC_Settings_Advanced::get_own_sections() code WC 10.5.0

protected function get_own_sections() {
	$sections = array(
		''     => __( 'Page setup', 'woocommerce' ),
		'keys' => __( 'REST API keys', 'woocommerce' ),
	);

	$features_controller = wc_get_container()->get( FeaturesController::class );
	if ( $features_controller->feature_is_enabled( 'rest_api_caching' ) ) {
		$sections['rest_api_caching'] = __( 'REST API caching', 'woocommerce' );
	}

	$sections['webhooks']        = __( 'Webhooks', 'woocommerce' );
	$sections['legacy_api']      = __( 'Legacy API', 'woocommerce' );
	$sections['woocommerce_com'] = __( 'WooCommerce.com', 'woocommerce' );

	if ( FeaturesUtil::feature_is_enabled( 'blueprint' ) ) {
		$sections['blueprint'] = __( 'Blueprint (beta)', 'woocommerce' );
	}

	return $sections;
}