Automattic\WooCommerce\Internal\Admin\Suggestions
PaymentExtensionSuggestionIncentives::is_incentive_visible()
Check if an incentive is visible.
Method of the class: PaymentExtensionSuggestionIncentives{}
No Hooks.
Return
true|false
. Whether there is a visible incentive for the suggestion.
Usage
$PaymentExtensionSuggestionIncentives = new PaymentExtensionSuggestionIncentives(); $PaymentExtensionSuggestionIncentives->is_incentive_visible(;
PaymentExtensionSuggestionIncentives::is_incentive_visible() PaymentExtensionSuggestionIncentives::is incentive visible code WC 9.6.0
public function is_incentive_visible( string $incentive_id, string $suggestion_id, string $country_code, bool $skip_extension_active_check = false ): bool { $provider = $this->get_incentive_instance( $suggestion_id ); if ( null === $provider ) { return false; } return $provider->is_visible( $incentive_id, $country_code, $skip_extension_active_check ); }