mycred_get_email_notice
Description
Returns an instance of the myCRED_Email object based on a given email notice post ID.
This function is only available if the Email Notifications add-on is enabled.
Available since version 1.8
Returns
(bool | obj) Returns FALSE if an invalid email ID is provided else the myCRED_Email object.
Parameters
| Param | Type | Required | Description | |
|---|---|---|---|---|
function mycred_get_email_notice( |
||||
$notice_id |
int | Yes | The email notifications post ID. |
|
) { ... } |
||||
Examples
Example 1: Get an instance for the email notice ID 123
$notice_id = 123;
$email = mycred_get_email_notice( $notice_id );
if ( $email !== false ) {
// do something
}