• Resolved dali44

    (@dali44)


    Hello

    I’m want to the great myCred plugin to incentivize file sharing on my WordPress site with 3rd party plugin (wpdm). Currently, authors receive reward points when they upload files. However, I’m keen to implement a system where authors earn points when their files are downloaded by other members.

    For example, file downloaded 1000 times so author get 1000 rewards points.

    Any advice or insights on how to set this up effectively would be immensely helpful.

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @dali44 ,

    Thanks for contacting us. Hope you are doing well.

    You can use ‘mycred_add’ function to reward points to user.

    Here is the documentation link:
    Documentation Link

    You need to check in WordPress Download Manager plugin whether they have provided an action hook for downloading files. You can then use this action hook to reward points to users.

    Let me know if you have any questions.

    Thanks & Regards,
    WP Experts Support Team

    Thread Starter dali44

    (@dali44)

    Hello

    Yes they have an action hook.

    job done with this code:

    function author_reward($package) {
             $user_id= $package['author'];
    mycred_add( 'file_author_reward', $user_id, 10, 'Points for downloaded files' );
    }
    add_action( 'wpdm_onstart_download', 'author_reward' ); 

    Thanks for your help

    Best regards

    • This reply was modified 8 months, 1 week ago by dali44.

    Glad to hear that your issue resolved.

    I would really appreciate if you can us a review on our plugin profile. It will be helpful for us and new users.

    Thanks alot.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘points rewards for files sharing’ is closed to new replies.