Automattic\WooCommerce\Internal\Admin\Suggestions
PaymentExtensionSuggestionIncentives::is_incentive_dismissed()
Check if an incentive has been dismissed for a specific payment extension suggestion.
Метод класса: PaymentExtensionSuggestionIncentives{}
Хуков нет.
Возвращает
true|false
. Whether the incentive has been dismissed for the suggestion.
Использование
$PaymentExtensionSuggestionIncentives = new PaymentExtensionSuggestionIncentives(); $PaymentExtensionSuggestionIncentives->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.
По умолчанию: ''
Код PaymentExtensionSuggestionIncentives::is_incentive_dismissed() PaymentExtensionSuggestionIncentives::is incentive dismissed WC 9.6.1
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 ); }