Automattic\WooCommerce\Internal\Admin\Suggestions

PaymentExtensionSuggestionIncentives::is_incentive_dismissed()publicWC 1.0

Check if an incentive has been dismissed for a specific payment extension suggestion.

Method of the class: PaymentExtensionSuggestionIncentives{}

No Hooks.

Return

true|false. Whether the incentive has been dismissed for the suggestion.

Usage

$PaymentExtensionSuggestionIncentives = new PaymentExtensionSuggestionIncentives();
$PaymentExtensionSuggestionIncentives->is_incentive_dismissed( $incentive_id, $suggestion_id, $context ): bool;
$incentive_id(string) (required)
The incentive ID.
$suggestion_id(string) (required)
The suggestion ID.
$context(string)
The context ID in which the incentive is checked.
Default: ''

PaymentExtensionSuggestionIncentives::is_incentive_dismissed() code WC 9.6.0

public function is_incentive_dismissed( string $incentive_id, string $suggestion_id, string $context = '' ): bool {
	$provider = $this->get_incentive_instance( $suggestion_id );
	if ( null === $provider ) {
		return false;
	}

	return $provider->is_dismissed( $incentive_id, $context );
}