Hi @starpage5054,
Thanks for reaching out and providing the screenshots (that helps alot). On the surface and what you provided so far – yes, that is odd. The 15 items in the admin are really donations NOT donors – although in theory each one should be from a unique individual (I double checked and not seeing duplicate names). But if you had 15 donations and 1 person is responsible for two of them, that could be a reason.
I see an anonymous donor on the list. Can you try making that payment briefly “pending” which should remove it from the donor list but we’ll see if the “14” number changes?
Otherwise you may need to share some additional information for our support team to gain access to your site and trace the database call to confirm why it’s pulling that particular total.
Thanks!
Hi @wpcharitable
Thank you so much for your prompt reply.
I just changed the payment status if the anonymous donor and the number of donors changed from 14 to 13 https://www.screencast.com/t/bHePHMSQjX
But as you can see, the list of names now becomes 14.
How do we fix this?
@starpage5054 Thanks for your response. First off please do this additional troubleshooting to rule out a few basic common items:
1. Make sure your cache is off/cleared both on the WordPress end and anything that your server might be running.
2. View the page with non-Charitable plugins turned OFF and also on a WordPress default theme (you can switch right back and turn on the plugins when done). This helps greatly determine quickly if this is a third party coding issues of some sort.
If that isn’t the case then the current theory is that although you have 15 donations, you have 14 donors according to your database. Please make sure all 15 donations are coming from 15 unique donors with unique email addresses. After that we need to get more details about what is being pulled from the database:
- Enable logging with WP_DEBUG and WP_DEBUG_LOG. Here’s an article showing the few ways you can do this.
- Look at /charitable/includes/data/class-charitable-campaign-donations-db.php around line 460 in the count_campaign_donors function and right before the “return $wpdb” line of code, add this before it:
error_log( ‘count_campaign_donors’);
error_log( print_r( $sql, true ) ); - Then go back to your public page and refresh the page. Make sure you clear any cache prior to this.
- Examine the debug.log file in your wp-content folder to see/confirm what SQL is being generated. You should get a number in the logs below “count_campaign_donors”). You can view also additional instructions on viewing the logs here.
If you get the same incorrect number, then you might need to grant our team additional access to take a direct look into your database to see if there is corrupted or incorrect information in the tables/rows that store donors for donations.
Based on your reply, I checked each names listed above and found out that Patsy and Dolores are using the same email address.
I randomly checked about 3 campaigns with the same issue and 3 more campaigns that don’t have that issue, meaning they match the number of donors with the number of listed names, and your theory was correct.
Those campaigns with issue have some names with similar email address that’s why they must have been counted as 1 donation.
If this is the case then I guess this issue is now resolved. 🙂
Thank you so much for your great help!
@starpage5054 no problem. thanks for checking that. at the present time, Charitable counts unique donors by email address.
Glad we could help. Thanks for using Charitable and have a good rest of the day!