Automattic\WooCommerce\Internal\Admin\Suggestions\Incentives
Incentive::get_all_dismissed_incentives
Get all the dismissed incentives grouped by suggestion.
Method of the class: Incentive{}
No Hooks.
Returns
Array. The dismissed incentives grouped by suggestion.
Usage
// protected - for code of main (parent) or child class $result = $this->get_all_dismissed_incentives(): array;
Incentive::get_all_dismissed_incentives() Incentive::get all dismissed incentives code WC 10.6.2
protected function get_all_dismissed_incentives(): array {
$all_dismissed_incentives = get_user_meta( get_current_user_id(), $this->dismissed_meta_name, true );
if ( empty( $all_dismissed_incentives ) ) {
$all_dismissed_incentives = array();
}
return $all_dismissed_incentives;
}