In Configuration > Plugins you can activate the "Maximum Commissions Per Referral" plugin. This plugin allows you to define maximum number of commissions which should be saved within a defined time frame per user (affiliate or customer).
The plugin runs when a commission is being saved and based on your settings it allows the commission to save or not.
In the main configuration of the plugin you can choose whether the plugin should check the maximum number of commissions per affiliate or per customer (based on selected commission Extra Data field). You can also add a condition to the search filter to count only commissions for the same product as is being saved.
The second part of the plugin configuration is in every commission type in all of your campaigns so in Campaigns > Campaigns manager > Edit your campaign > Commission settings tab > and Edit the desired commission type.
The following are the default plugin settings. Without the "Maximum commissioms per referral" set to some number this plugin has no effect.
At the top of the Plugin Configuration you select the mode in which the plugin will work. You can choose whether the plugin should be applied per affiliate or per customer.
When the plugin kicks in during saving of a commission the software gets the type of the commission which is being saved and looks at the Maximum commission per referral and Maximum commissions time period in seconds settings for that commission type. So essentially if a per Sale commission from campaign A is being saved it looks into the configuration of per Sale commission in campaign A.
With per affiliate setting it searches for all commissions of given type (tier commissions included) saved under the affiliate for whom the current commission is being saved.
With per customer setting it searches for all commissions of given type (tier commissions included) which have the same content as the currently being saved commission in the extra data field which you've selected in the Plugin Configuration under "Transaction data field". So for example if the currently being saved commission has "email@example.com" in the configured data field, then it filters all previously saved commissions within the defined time frame which contain "firstname.lastname@example.org" in the same data field.
If the "Apply plugin per product" setting is enabled it searches only for the commissions with exactly the same Product ID as the one which is being saved.
It gets the number of all the commissions matching the search filter and if the number is equal or higher to the one which you have defined in Maximum commission per referral for this particular commission type it stops the commission saving.
What is important to realize is that commission type is unique per campaign. For example per Sale commission in campaign A is different than per Sale commission in campaign B, so if you define 5 under per Sale commission in campaign A it won't be applied if the commission which is being saved is a per Sale commission from campaign B.
This plugin is for example useful if you want to give only 5 per sale commissions for one customer, or for example if you want to say that affiliate can earn only 10 commissions within the last 30 days in one campaign.