WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions

EvaluateSuggestion{} WC 1.0

Evaluates the spec and returns the evaluated suggestion.

Хуков нет.

Возвращает

null. Ничего.

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

$EvaluateSuggestion = new EvaluateSuggestion();
// use class methods

Методы

  1. evaluate( $spec )

Код EvaluateSuggestion{} WC 5.7.1

class EvaluateSuggestion {
	/**
	 * Evaluates the spec and returns the suggestion.
	 *
	 * @param array $spec The suggestion to evaluate.
	 * @return array The evaluated suggestion.
	 */
	public static function evaluate( $spec ) {
		$rule_evaluator = new RuleEvaluator();
		$suggestion     = (object) $spec;

		if ( isset( $suggestion->is_visible ) ) {
			$is_visible             = $rule_evaluator->evaluate( $suggestion->is_visible );
			$suggestion->is_visible = $is_visible;
		}

		return $suggestion;
	}
}