Hook to execute custom code when a discount code is used after a membership checkout.

do_action( 'pmpro_discount_code_used', $discount_code_id, $user_id, $code_order_id );


int ID of the discount code from the pmpro_discount_codes table.
int ID of the user that claimed the discount code.
string The MemberOrder ID for this checkout. Empty if the order has not been created yet.


File: https://github.com/strangerstudios/paid-memberships-pro/blob/master/preheaders/checkout.php

View in Source Code