By default, myCRED allows you to let purchases expire after a certain number of hours. This filter lets you change this calculation from hours to any other time measurement. If you use this filter you should also consult the mycred_sell_exp_title filter.
Param | Type | Required | Description |
---|---|---|---|
$expiration |
int | No | The expiration length in seconds. This value is multiplied with the length you set e.g. 2 hours, and added to the time a user last paid. |
$length |
int | No | The length set for this particular post. |
$user_id |
int | No | The numeric ID of the user this calculation is related to. |
$post_id |
int | No | The post ID. |
Package | Prio. | Description |
---|---|---|
mycred/content | 10 | Used by the mycred_content_purchase_has_expired function. |
Example 1: Change the expiration length calculation from using hours to days.