Title: Youtube hook
Last modified: August 21, 2016

---

# Youtube hook

 *  Resolved [Louring](https://wordpress.org/support/users/louring/)
 * (@louring)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/)
 * It seems like the points for viewing youtube videos doesn’t work or doesn’t count
   the right way. The history is showing the right numbers but the balance is wrong:
 * [IMG]http://i44.tinypic.com/2lwvlkx.jpg[/IMG]
 * [http://wordpress.org/plugins/mycred/](http://wordpress.org/plugins/mycred/)

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

 *  Thread Starter [Louring](https://wordpress.org/support/users/louring/)
 * (@louring)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/#post-4062680)
 * sorry you can see it here: [http://i.imgur.com/sqr0fY0.jpg](http://i.imgur.com/sqr0fY0.jpg)
 *  Plugin Author [myCred](https://wordpress.org/support/users/designbymerovingi/)
 * (@designbymerovingi)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/#post-4062684)
 * Can you give some more details so I can try and replicate the issue? If you reload
   the page, does the balance adjust itself?
 *  Thread Starter [Louring](https://wordpress.org/support/users/louring/)
 * (@louring)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/#post-4062693)
 * Only the history reload, not the balance. I can send you a login to my site if
   you want?
 *  Plugin Author [myCred](https://wordpress.org/support/users/designbymerovingi/)
 * (@designbymerovingi)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/#post-4062694)
 * I think I found the issue.
 * Open mycred/modules/mycred-module-hooks.php
 * On line 1424 you will find:
 *     ```
       $this->update_creds( $users_log->id, $user_id, $users_log->creds+$amount );
       ```
   
 * Change this to:
 *     ```
       $this->update_creds( $users_log->id, $user_id, $users_log->creds+$amount );
       $this->core->update_users_balance( $user_id, $amount );
       ```
   
 * same thing 6 rows further down, you will find:
 *     ```
       $this->update_creds( $users_log->id, $user_id, $users_log->creds+$amount );
       ```
   
 * Change it to:
 *     ```
       $this->update_creds( $users_log->id, $user_id, $users_log->creds+$amount );
       $this->core->update_users_balance( $user_id, $amount );
       ```
   
 *  Thread Starter [Louring](https://wordpress.org/support/users/louring/)
 * (@louring)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/#post-4062877)
 * Perfect, it’s working 🙂
    Thanks a lot!

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

The topic ‘Youtube hook’ is closed to new replies.

 * ![](https://ps.w.org/mycred/assets/icon-128x128.gif?rev=3512531)
 * [Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred](https://wordpress.org/plugins/mycred/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mycred/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mycred/)
 * [Active Topics](https://wordpress.org/support/plugin/mycred/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mycred/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mycred/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Louring](https://wordpress.org/support/users/louring/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/youtube-hook/#post-4062877)
 * Status: resolved