Home Forums WTI Like Post PRO Changing like/unlike programmatically?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #273
    RedZone908
    Participant

    Hello,

    I have reason to at times need to be able to change like/unlike counts programmatically (that is, in PHP or Javascript). I am dealing with a WordPress site whose content is sometimes exposed externally, so that is where this requirement comes from.

    I notice that the “wti_like_post_process_vote” action in the PHP code of the WTI Like Post plugin is very simple to interface with via REST–it only requires a post ID, a task (like/unlike), and a nonce. My question is this: does WTI recommend use of the “wti_like_post_process_vote” action by external code (“external” as in another WP plugin calling said action), or is that action supposed tob e for internal use only?

    #274
    Webtechideas
    Keymaster

    That is for internal use only. It takes care of different conditions as set on the plugin configuration settings page. So if you use that and try to manipulate the votes, then it may not allow you to do so. So we would suggest to create your own piece of code which will work as per your requirement.

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