edd_pre_insert_discount

This action runs just before a discount code is created. It receives one parameter: $discount_details.

$discount_details is an array containing all fields for the discount, such as name, type, amount, etc.

do_action( 'edd_pre_insert_discount', $discount_details );