WC_Settings_Payment_Gateways::standardize_section_nameprivateWC 1.0

Standardize the current section name.

Method of the class: WC_Settings_Payment_Gateways{}

No Hooks.

Returns

String. The standardized section name.

Usage

// private - for code of main (parent) class only
$result = $this->standardize_section_name( $section ): string;
$section(mixed) (required)
The section name to standardize.

WC_Settings_Payment_Gateways::standardize_section_name() code WC 10.3.3

private function standardize_section_name( $section ): string {
	$section = (string) $section;
	// If the section is empty, we are on the main settings page/section. Use a standardized name.
	if ( '' === $section ) {
		return self::MAIN_SECTION_NAME;
	}

	return $section;
}