Home Forums WTI Like Post PRO Hook, Do_Action

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #216
    DenisCGN
    Participant

    Hello,

    I use a caching plugin (cachefiy) that allows me to use a DO_ACTION to delete the post cache if needed.
    So after voting it is needed. Can someone help me where and how to put this code?

    do_action(‘cachify_remove_post_cache’, 123); // postID

    “123” should be the PostID.

    I tried this

    /* Hook for adding any activity to successful voting */
    
    function wti_like_post_vote_action( $post_id ) {
    do_action('cachify_remove_post_cache', $post_id);
    }
    add_action( 'wti_like_post_vote_action', 'wti_like_post_vote_action', 10, 6 );

    Thanks a lot for help,
    Denis

    • This topic was modified 6 years, 2 months ago by DenisCGN.
    #218
    DenisCGN
    Participant

    This seems to work!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘WTI Like Post PRO’ is closed to new topics and replies.