WC_Admin_Attributes::slug_field_description
Build the slug field description shown to users (and served to search engines and no-JavaScript clients as the static copy).
States the authoritative byte limit alongside a character estimate tailored to the script of the user's language, so users on non-Latin scripts get a meaningful figure rather than a raw byte count they must translate into characters themselves.
Method of the class: WC_Admin_Attributes{}
No Hooks.
Returns
string.
Usage
$result = WC_Admin_Attributes::slug_field_description(): string;
WC_Admin_Attributes::slug_field_description() WC Admin Attributes::slug field description code WC 11.1.2
private static function slug_field_description(): string {
return sprintf(
/* translators: 1: maximum slug length in bytes, 2: approximate maximum number of characters for the user's language. */
__( 'Unique slug/reference for the attribute. Limited to %1$d bytes — roughly %2$d characters in your language; non-ASCII characters use 2–4 bytes each.', 'woocommerce' ),
wc_get_attribute_slug_max_byte_length(),
AttributeSlugLength::get_character_estimate()
);
}