• hello,

    inside my download_history.php page i got this if condition:

    $PurchasedList = edd_get_users_purchases( get_current_user_id(), 20, true, 'any' );
    if ( $PurchasedList ) {
     show purchased item list
    } else {
     echo 'not item purchased yet';
    }

    but when user has charged his wallet. download_history page becomes white with no content. as PurchasedList does exist so the condition is not echoing ‘no purchased yet’ and as user has a transaction but that transaction is not purchasing an item so there is not content in page and the page becomes empty.

    can you help me to edit my if condition like this :

    $PurchasedList = edd_get_users_purchases( get_current_user_id(), 20, true, 'any' );
    if ( $PurchasedList && PurchasedType == 'Product, Not Wallet Charge!') {
     show purchased item list
    } else {
     echo 'not item purchased yet';
    }

    Thanks

Viewing 1 replies (of 1 total)
  • Hi @erfanmhd

    I think you are talking about EDD Wallet plugin. I am not sure about it how it handles history / purchase entry.

    Can you please provide me sample array of $PurchasedList when there is no purchase? So I can take a look at the array and try yo understand the scenario.

    Note : As this is a add-on of EDD so you can raise a support ticket on their site also. They will surly help you in this.

    • This reply was modified 4 years, 1 month ago by Pratik Jain.
Viewing 1 replies (of 1 total)
  • The topic ‘Filter download_history to only show downloads’ is closed to new replies.