Automattic\WooCommerce\Internal\Admin\Suggestions

PaymentsExtensionSuggestions::dismiss_incentive │ public │ WC 1.0

Dismiss an incentive for a specific payment extension suggestion.

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

Хуков нет.

Возвращает

bool. True if the incentive was not previously dismissed and now it is. False if the incentive was already dismissed or could not be dismissed.

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

$PaymentsExtensionSuggestions = new PaymentsExtensionSuggestions();
$PaymentsExtensionSuggestions->dismiss_incentive( $incentive_id, $suggestion_id, $context ): bool;
$incentive_id(строка) (обязательный)
The incentive ID.
$suggestion_id(строка) (обязательный)
The suggestion ID.
$context(строка)
The context ID for which the incentive should be dismissed. If not provided, the incentive will be dismissed for all contexts.
По умолчанию: 'all'

Код PaymentsExtensionSuggestions::dismiss_incentive() WC 11.2.1

public function dismiss_incentive( string $incentive_id, string $suggestion_id, string $context = 'all' ): bool {
	return $this->suggestion_incentives->dismiss_incentive( $incentive_id, $suggestion_id, $context );
}