Comments on: myCred Hooks 101 https://mycred.me/tutorials/how-to-make-your-custom-hook/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-make-your-custom-hook Free WordPress Reward, Badge, Loyalty & Points Management Plugin Mon, 15 Jul 2024 11:27:04 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: rpetitto https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62112 Wed, 28 Mar 2018 12:49:31 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62112 In reference to the line, “Further more when using add_creds() anywhere in your hook, you must set the point type variable or the user will only receive points for the default point type and nothing else,” what would need to be added/modified to award a non-default point type? For example if I have a point type with label “credits” and meta-key “mycred_currency”, how would I specify?

I have a hook (https://pastebin.com/AFihtBkA) that is supposed to award “credits” but is instead awarding the default point-type despite the fact that it’s set up correctly on the front end in the Hooks section.

]]>
By: maroelamedia https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62111 Thu, 26 Oct 2017 13:34:15 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62111 This tutorial works great if you want to award points, but how do you award badges?

]]>
By: Pedro Souza https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62110 Wed, 10 May 2017 14:47:22 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62110 Hello, I would like to create a Hook to punctuate an indication of registration by active users, that is, a new user register inform the email of the user that sent the indication and this receive a score. What bundles and classes can I use?

]]>
By: Snowtimer https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62109 Tue, 15 Nov 2016 18:21:38 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62109 please anyone can help me, im using QAENGINE, i need to create a hook for best answe but i dont know how to know the name of the action in my qaengine plugin,

]]>
By: AJ https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62108 Mon, 23 Nov 2015 12:05:13 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62108 Hi

Sorry for bumping this post but I’m currently using a plugin called SportsPress Pro and I’m looking to create a custom hook where I can give points to players that play in a football/soccer match and have a status of Starting Lineup next to their player’s name.

Any help with this would be very welcome 🙂

Thanks

AJ

]]>
By: Razk https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62107 Mon, 02 Feb 2015 18:40:29 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62107 Well I’m trying to create a hook that award users that make a transference I’m using the action ‘ mycred_transfer_completed ‘ for this hook. My hook is installed and enabled. But is not working, can you check my hook below, please. Also how can I set the amount awarded to the amount that the user has transfered? There’s a way to do that?

[code removed – please use a pastebin or gist]

]]>
By: Gabriel Merovingi https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62106 Tue, 19 Aug 2014 12:59:55 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62106 In reply to Damian.

The biggest change is in the class constructor which has now one more variable passing down the point type in question and you now have to make sure you use $this->core to get the myCRED_Settings class instead of using mycred(); in your hook. If you contact me by email I would be happy to help you out.

]]>
By: Damian https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62105 Tue, 19 Aug 2014 12:11:45 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62105 When working with multiple points types, how all these changes? Adding the point type in the add_creds functions is not working , and points are being duplicated

]]>
By: Gabriel Merovingi https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62104 Tue, 05 Aug 2014 08:11:35 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62104 In reply to lakshmanan.

Either if the plugin has online documentation for you to look through or if you search the plugin files for the occurrence of do_action or apply_filters.

]]>
By: lakshmanan https://mycred.me/tutorials/how-to-make-your-custom-hook/#comment-62103 Tue, 05 Aug 2014 07:01:54 +0000 https://devstages.wpengine.com/?post_type=tutorial&p=462#comment-62103 Am using web librarian plugin , how can i add points after user lended the book

]]>