Recent Activity Problem

Marty

Member
Hello,

I have an issue with the "recent actvity" within the mailwizz dashboard.
It is not updating properly and missing updates like "new subscriber in list" etc...

How can I fix this?

Thank you
 
Sorry for this question.
How to remove Recent Activity panel in customer dashboard?
Or limited the views only the last 2 Activity?
 

Attachments

  • Screenshot 2023-12-06 at 10.53.41 PM.png
    Screenshot 2023-12-06 at 10.53.41 PM.png
    12.9 KB · Views: 3
Sorry for this question.
How to remove Recent Activity panel in customer dashboard?
Or limited the views only the last 2 Activity?
We show in that timeline only the activity from the last three days. If we want to see only the last two days you can create a file init-custom.php in web/apps/ directory and in this file add this code:
PHP:
hooks()->addFilter('customer_dashboard_timeline_items_list', function($timelineItems, $context) {
    // In this line of code 2 means how many days to see (maximum is 3)
    return array_slice($timelineItems, 0, 2);
});

also if you want to see maximum two activity per day you need to adjust this code a little bit like in this example:

PHP:
hooks()->addFilter('customer_dashboard_timeline_items_list', function($timelineItems, $context) {

    foreach ($timelineItems as $index => $timelineItem) {
        // in this line example: 2 is how many items you want to see per day.
        $timelineItems[$index]['items'] = array_slice($timelineItem['items'], 0, 2);
    }

    // In this line of code 2 means how many days to see (maximum is 3)
    return array_slice($timelineItems, 0, 2);
});
 
Back
Top