Automattic\WooCommerce\Internal\Admin\Suggestions
PaymentsExtensionSuggestions::dismiss_incentive
Dismiss an incentive for a specific payment extension suggestion.
Method of the class: PaymentsExtensionSuggestions{}
No Hooks.
Returns
true|false. True if the incentive was not previously dismissed and now it is. False if the incentive was already dismissed or could not be dismissed.
Usage
$PaymentsExtensionSuggestions = new PaymentsExtensionSuggestions(); $PaymentsExtensionSuggestions->dismiss_incentive( $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 for which the incentive should be dismissed. If not provided, the incentive will be dismissed for all contexts.
Default: 'all'
PaymentsExtensionSuggestions::dismiss_incentive() PaymentsExtensionSuggestions::dismiss incentive code WC 10.3.3
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 );
}