WordPress at a glance
function is not described

wc_bool_to_string() WC 3.0.0

Converts a bool to a 'yes' or 'no'.

No Hooks.

Return

String. Nothing.

Usage

wc_bool_to_string( $bool );
$bool(true|false|string) (required)
Bool to convert. If a string is passed it will first be converted to a bool.

Changelog

Since 3.0.0 Introduced.

Code of wc_bool_to_string() WC 5.3.0

<?php
function wc_bool_to_string( $bool ) {
	if ( ! is_bool( $bool ) ) {
		$bool = wc_string_to_bool( $bool );
	}
	return true === $bool ? 'yes' : 'no';
}