Automattic\WooCommerce\Internal\Admin\Suggestions
PaymentsExtensionSuggestionIncentives::is_incentive_dismissed
Check if an incentive has been dismissed for a specific payment extension suggestion.
Метод класса: PaymentsExtensionSuggestionIncentives{}
Хуков нет.
Возвращает
bool. Whether the incentive has been dismissed for the suggestion.
Использование
$PaymentsExtensionSuggestionIncentives = new PaymentsExtensionSuggestionIncentives(); $PaymentsExtensionSuggestionIncentives->is_incentive_dismissed( $incentive_id, $suggestion_id, $context ): bool;
- $incentive_id(строка) (обязательный)
- The incentive ID.
- $suggestion_id(строка) (обязательный)
- The suggestion ID.
- $context(строка)
- The context ID in which the incentive is checked.
По умолчанию:''
Код PaymentsExtensionSuggestionIncentives::is_incentive_dismissed() PaymentsExtensionSuggestionIncentives::is incentive dismissed WC 11.1.2
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 );
}