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.
Changelog
Introduced in extension version 0.4
Source
wpmem_exp_after_set_exp is located in module.php
Usage
add_filter( 'wpmem_exp_after_set_exp' 'do_update_after_exp' ); 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; }
Code Snippet Library [Subscriber Content]
- Configure the PayPal extension for multi-unit pricing
- Set user expiration to a fixed date
- Set user forum access when using bbPress with the PayPal subscription extension
See a list of all filter and action hooks
Welcome to RocketGeek Interactive › Forums › wpmem_exp_after_set_exp