Skip to:
Content
Pages
Categories
Search
Top
Bottom

Unable to update ass_digest_items in wp_usermeta table

  • Avatar of neerajkumar2020
    neerajkumar2020
    Participant

    @neerajkumar2020

    Please help me how can i update the meta_value for ass_digest_items that is present in the usermeta table when any post/comment is added.

    Thanks & Regards
    Neeraj Kumar

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of neerajkumar2020
    neerajkumar2020
    Participant

    @neerajkumar2020

    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.

    Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @neerajkumar2020 have you posted at plugin’s support forum as Henry suggested in http://buddypress.org/support/topic/buddypress-ass_digest_items-in-usermeta-table/ ?

    Avatar of neerajkumar2020
    neerajkumar2020
    Participant

    @neerajkumar2020

    I have already posted as respect to Henery suggested, but still i am waiting for any response

    Avatar of henrywright
    henrywright
    Participant

    @henrywright

    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.

    http://codex.wordpress.org/Function_Reference/add_filter

    Regarding when posts are published, I think publish_post is the one you need to use.

    http://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' );
    Avatar of neerajkumar2020
    neerajkumar2020
    Participant

    @neerajkumar2020

    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.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.