WC_Data_Store_WP::get_search_stopwords()protectedWC 3.4.0

Retrieve stopwords used when parsing search terms.

Метод класса: WC_Data_Store_WP{}

Хуки из метода

Возвращает

Массив. Stopwords.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_search_stopwords();

Список изменений

С версии 3.4.0 Введена.

Код WC_Data_Store_WP::get_search_stopwords() WC 8.7.0

protected function get_search_stopwords() {
	// Translators: This is a comma-separated list of very common words that should be excluded from a search, like a, an, and the. These are usually called "stopwords". You should not simply translate these individual words into your language. Instead, look for and provide commonly accepted stopwords in your language.
	$stopwords = array_map(
		'wc_strtolower',
		array_map(
			'trim',
			explode(
				',',
				_x(
					'about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,www',
					'Comma-separated list of search stopwords in your language',
					'woocommerce'
				)
			)
		)
	);

	return apply_filters( 'wp_search_stopwords', $stopwords );
}