• Hi Gabriel,

    huge thanks for such an amazing plugin. I love the ability to import via CSV. One problem I came across today: the balance Importer doesn’t import custom point types.

    I am on version 1.4.6 with WP 3.8.1 and on importing (both methods: replace and adjust) it will only replace/adjust points of the default type.

    Default point type’s meta key is mycred_default, my custom point type’s meta key is mycred_shirt (have also tried different names, seems not to be the issue). CSV is setup correctly (exported it first, then just changed the point-balance in the csv and added an identical row for the custom point type).

    mycred_user,mycred_amount,mycred_ctype
    2,80,mycred_default
    2,70,mycred_shirt

    On replace mode it will have 70 for mycred_default for the given user and 0 (or unchaged) for mycred_shirt.

    On adjust mode it will have 150 for mycred_default (assuming mycred_default was 0) and 0 (or unchaged) for mycred_shirt.

    Any thoughts what might be the issue?

    Best regards

    https://wordpress.org/plugins/mycred/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hey.

    Thank you for bringing this to my attention.
    Have you tried importing one point type at a time?

    So first one CSV file to update all users default point balances (mycred_default)
    then a second CSV file to import only custom point balances (mycred_shirt)?

    Thread Starter sdsdsdsasdsad

    (@sdsdsdsasdsad)

    Hi Gabriel,

    thanks for your reply.

    Yeah that was the first thing I tried when the multi-line didn’t work. Doesn’t work :-/

    Plugin Author myCred

    (@designbymerovingi)

    Ill investigate and get back to you.

    Plugin Author myCred

    (@designbymerovingi)

    Ok found the issue.

    I have updated the current version of 1.4.6. You can download a fresh copy and replace your current copy and get it resolved. Alternativly you can open the mycred-balances.php file which is located in the /plugins/mycred/includes/importers/ folder and change the following two lines:

    Line 131 from:

    $current_balance = get_user_meta( $user->ID, 'mycred_default', true );

    to:

    $current_balance = get_user_meta( $user->ID, $point_type, true );

    and on line 135 from:

    update_user_meta( $user->ID, 'mycred_default', $balance );

    to:

    update_user_meta( $user->ID, $point_type, $balance );

    Thread Starter sdsdsdsasdsad

    (@sdsdsdsasdsad)

    Gabriel, one word: AMAZING 🙂

    I’ll test on my wordpress-instance and report here.

    Best regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Balance Importer doesn't import custom point types’ is closed to new replies.