• Resolved AWOL

    (@awol)


    Hi,
    I updated the plugin today and now when I go to pay out a pending payment I get the message “Failed to credit the pending payment to account.” and the item is still in the list. I don’t know if this is anything to do with the update, but I can only assume it is because this was working yesterday. In my custom work I have not touched anything connected to the admin area, and the only file I have edited that is not in my child theme (because it would not work otherwise) is the buycred-shortcodes.php, which as far as I can tell, in the area I have edited (lines 204 to 209) only effects the output to the screen in the front end, not anything else. I compared the old file to the new file, and other than my edits, there have been no changes, so I think that some other change made in another file in the update has caused this. I have been trying to find which file or files impact this function but it is not easy, so hopefully your guys can find the cause.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter AWOL

    (@awol)

    Just for further information, I have been doing more investigation, and even though I get the message that the payout has failed, it is going through in the purchase log. So it seems that the problem is only that the admin Pending Payments panel is misbehaving, and not anything further. I had a quick look through the changes made by yourselves in the update files, but nothing jumped out at me to suggest what it might be. So I am still looking into whether it might be the changes I made, but replacing my edited file with the original file (which didn’t change in your update) has made no difference. Just to describe my change, I added a couple of lines and edited one value so that when users want to buy using the mycred buy form, the amount was already prefilled with a value taken from the Classified Listing post, and the field was made read only.

    Hi @awol,

    Thank you for contacting us, We have forwarded the details to the QA Team let’s see what they have to say about it.

    Hi @awol,

    Can you please share the edited/updated code by you as it is working fine on our staging environment?

    Thread Starter AWOL

    (@awol)

    Hi,
    OK, so this is in the file buycred-shortcodes.php. Below is the small block of code from lines 202 to 208 in the original, where I have added a line after 205 and edited line 208 (which becomes 209 below because of the added line). This is the modified code.

    <?php
    
    		// No amount given - user must nominate the amount
    		if ( count( $amounts ) == 0 ) {
        $dosh = get_post_meta( get_the_ID(), "_field_61", true );
    
    ?>
    				<input type="text" name="amount" class="form-control" placeholder="<?php echo $mycred->format_creds( $minimum ); ?>" min="<?php echo $minimum; ?>" value="<?php echo $dosh; ?>" readonly/>

    To summarise, I added this line after 205;
    $dosh = get_post_meta( get_the_ID(), "_field_61", true );
    and changed this original line (208)
    <input type="text" name="amount" class="form-control" placeholder="<?php echo $mycred->format_creds( $minimum ); ?>" min="<?php echo $minimum; ?>" value="" />
    to this (which became 209)
    <input type="text" name="amount" class="form-control" placeholder="<?php echo $mycred->format_creds( $minimum ); ?>" min="<?php echo $minimum; ?>" value="<?php echo $dosh; ?>" readonly/>

    I really can’t see why these edits would affect the backend, but if they have, please let me know what I can do to correct it. Thanks.

    Hi @awol,

    Our technical team needs some info from your side can you please create a support ticket on our official website. So we can assist you accordingly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘myCred update: Cannot pay out buyCred points’ is closed to new replies.