Perform an action before a discount code is added if it doesn’t already exist.


/**
 * Run an action before a discount code is added.
 *
 * @since 2.3.0
 *
 * @see PMPro_Discount_Code->save
 *
 * @param PMPro_Discount_Code $this Reference to the class.
 */
do_action( 'pmpro_add_discount_code', $this );

Parameters

$this
PMPro_Discount_Code

Source

File: https://github.com/strangerstudios/paid-memberships-pro/blob/master/classes/class-pmpro-discount-codes.php

View in Source Code