WC_CLI_COM_Command::ask
We are asking a question and returning an answer as a string.
Метод класса: WC_CLI_COM_Command{}
Хуков нет.
Возвращает
Строку.
Использование
$result = WC_CLI_COM_Command::ask( $question );
- $question(строка) (обязательный)
- The question being prompt.
Код WC_CLI_COM_Command::ask() WC CLI COM Command::ask WC 10.7.0
protected static function ask( $question ) {
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fwrite
// Adding space to question and showing it.
fwrite( STDOUT, $question . ' ' );
return trim( fgets( STDIN ) );
// phpcs:enable
}