<?php

namespace CouponsPlus\App\Handlers;

use CouponsPlus\Original\Events\Handler\EventHandler;

Class OnlyValidItemsToApplyHandler extends EventHandler
{
    protected $numberOfArguments = 1;
    protected $priority = 10;

    public function execute()
    {
        add_filter('woocommerce_coupon_get_items_to_apply', function (array $itemsToApply) {
            return array_filter($itemsToApply);
        }, 100);
    }
}