Please help me what is the use of “ass_digest_items” in usermeta table (buddypress) and how can i update the value when any comment/post is added.
I have already posted as respect to Henery suggested, but still i am waiting for any response
Hi @neerajkumar2020
The plugin authors are possibly busy, I’m sure they’ll get back to you if they can.
In the mean time you could try using a filter to do what you need.
https://codex.wordpress.org/Function_Reference/add_filter
Regarding when posts are published, I think publish_post
is the one you need to use.
https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post
So as an example, you’d add something like this to your theme’s functions.php file
function my_custom_filter_function( $post_id ) {
// the post has been published so let us update the value of ass_digest_items
// your value can be a string, an array, an integer etc...
bp_update_user_meta( get_current_user_id(), 'ass_digest_items', 'Your value goes here' );
}
add_action( 'publish_post', 'my_custom_filter_function' );
Hi Henry,
I have checked with plugin:
buddypress-group-email-subscription/bp-activity-subscription-digest.php
there is conditional checked with database
i.e
$user_subscriptions = $wpdb->get_results( $wpdb->prepare( “SELECT user_id, meta_value FROM $wpdb->usermeta WHERE meta_key = ‘ass_digest_items’ AND meta_value != ”” ) );
Please help me by explaining , in which condition meta_value is updated for meta_key = ‘ass_digest_items’
Thank you in advance.