Automattic\WooCommerce\Blueprint\Importers
ImportSetSiteOptions::normalize_option_name
Normalise an option name for comparison against RESTRICTED_OPTIONS.
Mirrors the trimming WordPress applies to option names, and lowercases so the comparison matches the case-insensitive collation the database uses.
Method of the class: ImportSetSiteOptions{}
No Hooks.
Returns
string.
Usage
$result = ImportSetSiteOptions::normalize_option_name( $key ): string;
- $key(string) (required)
- The option key to normalise.
ImportSetSiteOptions::normalize_option_name() ImportSetSiteOptions::normalize option name code WC 11.1.2
private static function normalize_option_name( $key ): string {
return strtolower( trim( (string) $key ) );
}