pmpro_applydiscountcode_return_js

Since 1.7.10

This hook fires inside of the JS script tag returned by the applydiscountcode.php service. The hook can be used to do other PHP or JavaScript actions before sending the results of the discount code AJAX call to the client browser.


do_action( 'pmpro_applydiscountcode_return_js', string $discount_code, int $discount_code_id, int $level_id, level $code_level );

pmpro_discount_code_level

This filter modifies the level  given by a discount code.  It passes the level object and the discount code ID.


apply_filters( "pmpro_discount_code_level", object $pmpro_level, int $discount_code_id );