Support » Plugin: MailPoet 2 » Newsletter archive

  • Resolved stevem


    There’s a small bug in the archive. If there’s an automated newsletter (eg each day, week or month) then the archive lists at the end the next activated newsletter, which of course hasn’t yet been sent and has no date.

    It doesn’t seem possible to use the example code in Shortcode for Archive: Filters to remove this unwanted item, as it’s not possible to change the subject there.

    But it can be done in wysija-newsletters/modules/archive_std/archive_std_view.php.

    The code below works for me but please could whatever code is best be incorporated into the next update?

    Change line 120 to
    if ($newsletter->sent_at!=false){echo apply_filters('mpoet_archive_date', $newsletter->sent_at);}
    and line 126 to
    if ($newsletter->sent_at!=false){echo apply_filters('mpoet_archive_subject', $newsletter);}

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author MailPoet


    Thanks for lettings us know about that Stevem, we’ll definitely take a look at it!

    Plugin Author MailPoet


    Hello Stevem,
    What you reported is absolutely true!

    We will release the fix in the next version.
    For now, please revert your changes and apply this patch.
    The file should be located at:

    Here you go:

    Try that and let us know.

    That’s great and works well, thank you very much.

    That just leaves me with two customisations that I use which I’d love to see incorporated into the code or into functions.php so I don’t need to change them every time MailPoet is updated:

    1. to allow for date of post.

    2. My weekly newsletter has a title of “Newsletter with n new posts” which is easy enough unless n = 1 when I want to use ‘post’ instead of ‘posts’. So in wysija-newsletters/helpers/shortcodes.php I have changed [newsletter:total]. After line 244 I have added

    if ($replacement == '1') {
    		$replacement = $replacement.' new post';
    	} else {
    		$replacement = $replacement.' new posts';

    Apologies for changing the topic.

    Plugin Author MailPoet


    Thanks for these suggestions, we’ll definitely take them into consideration!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Newsletter archive’ is closed to new replies.