WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WC_Marketplace_Suggestions::allow_suggestions() public WC 1.0

Should suggestions be displayed?

Это метод класса: WC_Marketplace_Suggestions{}

Хуки из метода
Возвращает

true/false.

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

$result = WC_Marketplace_Suggestions::allow_suggestions();

Код WC_Marketplace_Suggestions::allow_suggestions() WC 4.5.2

woocommerce/includes/admin/marketplace-suggestions/class-wc-marketplace-suggestions.php
<?php
public static function allow_suggestions() {
	// We currently only support English suggestions.
	$locale             = get_locale();
	$suggestion_locales = array(
		'en_AU',
		'en_CA',
		'en_GB',
		'en_NZ',
		'en_US',
		'en_ZA',
	);
	if ( ! in_array( $locale, $suggestion_locales, true ) ) {
		return false;
	}

	// Suggestions are only displayed if user can install plugins.
	if ( ! current_user_can( 'install_plugins' ) ) {
		return false;
	}

	// Suggestions may be disabled via a setting under Accounts & Privacy.
	if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) {
		return false;
	}

	// User can disabled all suggestions via filter.
	return apply_filters( 'woocommerce_allow_marketplace_suggestions', true );
}