@roberto22
Please use the attached code in the theme functions.php file to view total credit in the admin section.
add_action('woo_wallet_before_balance_details_table', 'woo_wallet_before_balance_details_table_callback');
if(!function_exists('woo_wallet_before_balance_details_table_callback')){
??? function woo_wallet_before_balance_details_table_callback(){
??????? $args = array(
??????????? 'blog_id' => $GLOBALS['blog_id'],
??????????? 'fields' => 'ID',
??????????? 'meta_query' => array(
??????????????? array(
??????????????????? 'key' => '_is_wallet_locked',
??????????????????? 'compare' => 'NOT EXISTS'
??????????????? )
??????????? )
??????? );
??????? $total_remaining_balance = 0;
??????? $users = get_users($args);
??????? foreach ($users as $user_id) {
??????????? if (get_user_meta($user_id, '_current_woo_wallet_balance', true)) {
??????????????? $total_remaining_balance += get_user_meta($user_id, '_current_woo_wallet_balance', true);
??????????? }
??????? }
??????? echo '<p>Total remaining credit: '. wc_price($total_remaining_balance).'</p>';
??? }
}