Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @hkaadan You can use php code for this like.

    $total_balance = $wpdb->get_var( $wpdb->prepare( "SELECT SUM(CASE WHEN t.type = 'credit' THEN t.amount ELSE -t.amount END) as balance FROM {$wpdb->base_prefix}woo_wallet_transactions AS t WHERE  t.deleted=0" ) );
    Thread Starter hkaadan

    (@hkaadan)

    Thank you for your input.

    what i meant was to so this in export to xls/csv sheet

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get total wallets balance’ is closed to new replies.