Can you please tell me how to get NEWSLETTER ID


Can you please tell me how to get NEWSLETTER ID in class.function.php so that I can change this code with Newsletter ID
admin_url('admin-ajax.php?action=check_email_opened&send_id=' . $send_id --> $newsletter_id. '&member_id=' . $member_id . '&wp_only_user_id=' . $wp_only_user_id) . '" width="1" height="1"/></div>', $contents );

i want to replace $SEND_ID with NEWSLETTER ID which is displayed in Newsletter under ID

Kind regards,


  • borisjeleninternetsi

    Thanks for your reply... I'm sorry, but I guess I was a little too bit unclear.

    I would like to insert newsletter ID into custom link. So I would need to know what is the attribute for showing the ID of newsletter in my custom link - this one is not working: $newsletter['newsletter_id']

    You are using this code in class.functions.php:
    <img src="' . admin_url('admin-ajax.php?action=check_email_opened&send_id=' . $send_id . '&member_id=' . $member_id . '&wp_only_user_id=' . $wp_only_user_id) . '" width="1" height="1"/></div>', $contents );

    I would use some similar code, but instead of . $send_id . I would need to show newsletter ID. How can I do that?

  • Sajid

    Hi @bj

    Hope you are doing good today :slight_smile:

    I am not exactly sure how you want to use that ID or what your code is. But you can get all newsletters using following function. This will return you all the data of newsletter that you can loop through and use it according to your requirements.

    $newsletters = get_newsletters();

    You can find this function in class.functions.php file.

    Right now I can not see if newsletter object/array or even ID is available in this function directly.

    I am flagging developer of this plugin also here to get the newsletter ID with member ID or Send ID. Hope he could have more suitable code for you. Please bear in mind that their response time will not be like support staff, they have other responsibilities first, but will surely get back to you as soon as possible and depending on his workload.

    Hope that helps :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.