rcp_new_membership_added

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/

Triggers when a new membership is added, including both upgrades and downgrades. Note that this action hook runs when a membership record is created, but not necessarily when the membership is activated. So if a membership is created with the status "pending", then this hook will trigger. Therefore, this action should not be used under the assumption that the membership is active. If you only want to trigger custom code on activation, you may want to use one of these instead:

Parameters:

  • $membership_id (int) - ID of the new membership record.
  • $data (array) - Arguments used to create the membership record.
Powered by Zendesk