WordPress at a glance
function is not described

wc_sanitize_coupon_code() WC 3.6.0

Sanitize a coupon code.

Uses sanitize_post_field since coupon codes are stored as post_titles - the sanitization and escaping must match.

No Hooks.

Return

String. Nothing.

Usage

wc_sanitize_coupon_code( $value );
$value(string) (required)
Coupon code to format.

Changelog

Since 3.6.0 Introduced.

Code of wc_sanitize_coupon_code() WC 5.3.0

<?php
function wc_sanitize_coupon_code( $value ) {
	return wp_filter_kses( sanitize_post_field( 'post_title', $value, 0, 'db' ) );
}