Description
This is an action hook in the PayPal Subscription Extension. It comes at the end of the function wpmem_set_exp which sets the expiration date for the user. The action passes the user ID and a toggle to tell if it is a new subscription or a subscription renewal.
Parameters
$user_id
(integer)(optional) The user’s database primary key.
$renew
(boolean)(optional) Indicates if this is a renewal or a new subscription.
Example
add_action( 'wpmem_exp_after_set_exp' 'do_update_after_exp', 10, 2 ); function do_update_after_exp( $user_id, $renew ) { /** * You can use this action to do things immediately after the * user expiration date is set. At this point in the process, * the user has effectively paid. * * $user_id is the user's ID which can be used to update * user meta fields, or to retrieve/update information * about the user. * * $renew tells you if this is a renewal or a new * subscription. */ return; }
Changelog
- Introduced in extension version 0.4
Source
wpmem_exp_after_set_exp is located in /includes/class-wp-members-expiration-user.php