• anonwins

    (@anonwins)


    How to clean database of old transactions? Can I just remove old transactions from the database? Will that affect current user balances? Will it produce problems?

    What is the recommended way to delete old transactions without affecting balances?

    It would be great if the plugin had a setting for auto-deletion of old transactions after X days/weeks/months/years

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter anonwins

    (@anonwins)

    Hello?

    Plugin Author Subrata Mal

    (@subratamal)

    You can delete old transactions using bulk action on TeraWallet page.

    Thread Starter anonwins

    (@anonwins)

    Thank you!

    So it’s just this:

    $current_balance = woo_wallet()->wallet->get_wallet_balance( $user_id, 'edit' );
    delete_user_wallet_transactions( $user_id, true );
    if ( $current_balance ) woo_wallet()->wallet->credit ($user_id, $current_balance, __( 'Balance after deleting transaction logs', 'woo-wallet' ) );

    • This reply was modified 1 month, 3 weeks ago by anonwins.
    • This reply was modified 1 month, 3 weeks ago by anonwins.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.