• Dear @boonebgorges,

    first of all thanks so much for this great plugin! I have recently started to use it and for some reason, the weekly digests don’t end up in the send queue and are thus not being sent. Daily digest and everything else works like it should, but weekly digest don’t?! Any idea what could cause the issue?

    Kind regards, Philip

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Boone Gorges

    (@boonebgorges)

    Hi Philip – Thanks for the note.

    To be clear, the problem is not that weekly digests aren’t *sending*, it’s that items are not added to the weekly digest queue, right? These are two quite distinct problems. You can confirm by checking /?sum=1 while logged in as an admin.

    The most likely cause is that, by default, BPGES only adds a subset of items to the weekly digest. Here are the default values: https://github.com/boonebgorges/buddypress-group-email-subscription/blob/3.8.x/bp-activity-subscription-functions.php#L984

    You can add to this with a filter callback:

    
    add_filter(
      'ass_this_activity_is_important',
      function( $retval, $type ) {
        $my_custom_types = [ 'bbp_reply_create', 'new_group_member' ]; // add your own
        if ( in_array( $type, $my_custom_types, true ) ) {
          $retval = true;
        }
    
        return $retval;
      },
      10,
      2
    );
    
    Thread Starter Strothi

    (@strothi)

    Hey,

    Thanks for the quick reply. It’s actually both, it’s neither sending nor put into the queue which i can see as admin!

    Haven’t tried your code yet cause i’m not in the office, but I don’t think that that would address the issue?!

    Kind regards, Philip

    Thread Starter Strothi

    (@strothi)

    Dear @boonebgorges,

    did you see my response? The issue is not with a selection of items being put into the queue or not, but that nothing is being put into the queue and thus no digest is being sent!? Let me know if you need backend access to investigate what is causing the issue.

    Kind regards, Philip

    Plugin Author Boone Gorges

    (@boonebgorges)

    You specifically mentioned the *weekly* digest. When you said this, I assumed that the daily digest *is* working. If that’s the case, then my code is likely the answer, because it forces items to appear in the weekly digest that otherwise would only appear in the daily digest. Can you confirm whether items are added to the daily digest?

    Thread Starter Strothi

    (@strothi)

    Thanks for your quick reply @boonebgorges ??

    I did some further testing with various accounts. You are right, now that I tried with a new forum entry, it does show up in the weekly digest queue!

    Looking at the code you linked to I thought that activity updates would always be put into the weekly digest, but that doesn’t seem to be the case?!

    Should I use your snippet from above with “activity_update” as the value? And if so, put it into my function or directly change it in the plugin code?

    Thanks so much for your help ??

    Plugin Author Boone Gorges

    (@boonebgorges)

    Correct – if you put ‘activity_update’ in the list of activity types above, then it should go into the weekly digest. So:

    
    $my_custom_types = [ 'activity_update' ]; // add your own
    

    You can also add whichever others you’d like.

    Don’t put it directly in the plugin code – it’ll be overwritten on the next update. Instead, put it into your theme’s functions.php, or wp-content/plugins/bp-custom.php (you may have to create it; be sure it starts with <?php)

    Thread Starter Strothi

    (@strothi)

    I tried both, functions as well as bp-custom with the following code:

    add_filter(
      'ass_this_activity_is_important',
      function( $retval, $type ) {
        $my_custom_types = [ 'activity_update' ]; // add your own
        if ( in_array( $type, $my_custom_types, true ) ) {
          $retval = true;
        }
    
        return $retval;
      },
      10,
      2
    );

    No luck so far, am I missing something?

    Thread Starter Strothi

    (@strothi)

    Dear @boonebgorges,

    I hope you’ve had a good weekend. As you can see here BP Posts appear in both daily and weekly digests, but status updates in the group don’t?! Do you have any other idea how to solve the issue?

    Thanks so much in advance!

    Kind regards, Philip

    Plugin Author Boone Gorges

    (@boonebgorges)

    Hi Philip – Sorry you’re having problems. The code posted above works for me: updates posted to groups do, indeed, appear in weekly digest queues. Things to check:

    – Are you sure you put the code in a place where it’s actually being loaded?
    – Are you certain that there’s at least one user subscribed to receive weekly updates in the group? Be sure to try using a subscribed user other than the user posting updates, in case there’s an issue with self-notifications being suppressed.

    Thread Starter Strothi

    (@strothi)

    Dear @boonebgorges,

    I found the issue, though no solution yet. Apparently there’s a conflict with Youzer, which I use for BP. Thanks so much for your help thus far, I’ll work with the Youzer guys to get it hopefully resolved ??

    Kind regards, Philip

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Weekly Digest not working’ is closed to new replies.