Skip to content

magento 2.4 what are coupon modifiers?

I’m looking at MagentoSalesRuleviewfrontendwebjsactionset-coupon-code.js and on line 47 there’s this code:

 //Allowing to modify coupon-apply request
 dataModifiers.forEach(function (modifier) {
    modifier(headers, data);
 });

I was wondering what those dataModifiers are and how can be used.. I tried searching online but couldn’t find any info