WordPress.org

Ready to get started?Download WordPress

Forums

myCRED
[resolved] Transfer to -- (4 posts)

  1. xiao_coffe
    Member
    Posted 6 months ago #

    Hello! Great plugin:D

    I only have one little problem. I want the users to transfer "creds" to any name even if invented and not exist. The "creds" shall be taken away from them, but should be visible in the log where they send it to.

    Is there anyway to insert a code to do that or take away someone?

    (Now they can only transfer to recipients User email or User login)

    Regards: xiao_coffe

    http://wordpress.org/plugins/mycred/

  2. Gabriel
    Member
    Plugin Author

    Posted 6 months ago #

    Hi.

    Transfers are done via an AJAX call which you could intercept and override with your own settings.

    Example:

    add_action( 'wp_ajax_mycred-transfer-creds', 'my_own_transfer_ajax_script', 1 );
    function my_own_transfer_ajax_script() {
       ... your code ...
    }

    You could just copy and paste the code used by myCRED which is located in mycred/addons/transfer/myCRED-addon-transfers.php

    Since the above action example has priority 1, it will run before myCRED.

  3. xiao_coffe
    Member
    Posted 6 months ago #

    In which line should I insert that code?

    I know that it is maybe to much to ask for but is there any code you or someonelse know right now that should be working?

    Sorry that I´m not so good in the coding area but I´m learning.

    Regards: xiao_coffe

  4. Gabriel
    Member
    Plugin Author

    Posted 6 months ago #

    To make this type of customizations, it helps if you feel comfortable with PHP.
    When it comes to making changes to this plugin, you have two ways to add your customization:

    A) Create a custom plugin that applies all the customizations for you.
    B) Add your customizations to your child theme's functions.php file.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.