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 );

Parameters

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

Source

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

View in Source Code