wc_bool_to_string( bool|string $bool )
Converts a bool to a ‘yes’ or ‘no’.
Description Description
Parameters Parameters
- $bool
-
(Required) Bool to convert. If a string is passed it will first be converted to a bool.
Return Return
(string)
Source Source
File: includes/wc-formatting-functions.php
function wc_bool_to_string( $bool ) { if ( ! is_bool( $bool ) ) { $bool = wc_string_to_bool( $bool ); } return true === $bool ? 'yes' : 'no'; }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |