<?php

namespace CouponsPlus\App\Handlers;

use CouponsPlus\Original\Events\Handler\EventHandler;

#[\AllowDynamicProperties]
Class CustomDiscountTypesRegistrator extends EventHandler
{
    protected $numberOfArguments = 0;
    protected $priority = 10;

    public function execute()
    {
        add_filter('woocommerce_coupon_discount_types', [$this, 'registerCustomDiscountTypes'], 10, 1);
    }

    public function registerCustomDiscountTypes(array $discountTypes) : array
    {
        $discountTypes['coupons+'] = 'Coupons+';

        return $discountTypes;
    }
}

