Automattic\WooCommerce\Internal\Admin\Suggestions
PaymentsExtensionSuggestionIncentives::is_incentive_dismissed
Check if an incentive has been dismissed for a specific payment extension suggestion.
Method of the class: PaymentsExtensionSuggestionIncentives{}
No Hooks.
Returns
true|false. Whether the incentive has been dismissed for the suggestion.
Usage
$PaymentsExtensionSuggestionIncentives = new PaymentsExtensionSuggestionIncentives(); $PaymentsExtensionSuggestionIncentives->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: ''
PaymentsExtensionSuggestionIncentives::is_incentive_dismissed() PaymentsExtensionSuggestionIncentives::is incentive dismissed code WC 10.3.3
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 );
}