WPIntell

Source evidence

Not enough gravatars showing despite setting

EDD Purchase Gravatars · support · 2018-02-20T11:00:00+00:00

mixedsentiment
highseverity
0.95relevance
10replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 32 rows with source links

12.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Jack – BNFW resolved
Hi, I’ve noticed that there aren’t enough gravatars showing for my downloads. Take this one for example: https://betternotificationsforwp.com/downloads/custom-fields/ This has had hundreds of sales and I know that a huge number of those have been by customers that have a gravatar yet for some reason, only 5 are showing. I’ve actually been watching this dwindle from around ~15 to 5 or less in the past few weeks. I have the settings for the plugin set to show 20 images for users that do have a gravatar. Do you know why this might be happening? Thanks, Jack The page I need help with: [ log in to see the link] Hey Jack, Not off the top of my head. Could you try clearing out the “Maximum Gravatars To Show” field so there’s no limit? Does that then show a lot more Gravatars? Are you using the shortcode or widget? If you are using one, could you try using the other to see if that shows more Gravatars? Perhaps we can narrow down the issue. Could you show me a screenshot of your settings for the extension? Do you have a staging site that I could look at? I could then better troubleshoot by testing the code with your data. This reply was modified 8 years, 3 months ago by Andrew Munro / AffiliateWP . Also, has this always happened or is it a recent issue? Have you tried temporarily deactivating all other plugins except for EDD and Purchase Gravatars? I’d also recommend switching the theme temporarily. If you see more Gravtars after doing so then we’ll at least know where to start looking. I see in the HTML code for the images there are lazy load classes applied. Not 100% sure that’s the issue just yet but worth trying the above to see. Hi @sumobi , Just had a bit of a fiddle and it appears that the plugin is only ever loading 20 purchase IDs and not *all* of them when setting no value in the plugins settings. This is consistent for all the downloads, most of which had sales far greater than this. This isn’t related to the number of posts that I had set to show on my site because this is set to 10 in Settings > Reading. I’ve also tested using Twenty Seventeen and with only EDD and EDD Purchase Gravatars activated along with using a shortcode in the Downloads post body instead of a widget and it always only shows 20 gravatars. Is there anything in the database I can look for to help troubleshoot? Thanks, Jack Thanks for doing that Jack – I’ve now replicated the issue. I’ll dig in and get a patch going. Cheers! Hey Jack, There’s a few other issues this plugin needs for the next update (including your other suggestion) so I’ll schedule in some time and get those completed. In the mean time, If you make a small tweak to the main plugin file I can show you how to fix this issue now: 1. Open up the main plugin file, edd-purchase-gravatars.php 2. On line 148, replace: $logs = $edd_logging->get_logs( $download_id, 'sale' ); with: $logs = $edd_logging->get_connected_logs( array( 'post_parent' => $download_id, 'log_type' => 'sale', 'posts_per_page' => -1 ) ); Here’s the exact line to change for reference https://github.com/easydigitaldownloads/edd-purchase-gravatars/blob/master/edd-purchase-gravatars.php#L148 Hi @sumobi , That works! Thanks very much for your help and quick support. As an aside (but as a slight extension of this request), it would be great to be able to exclude a comma separated list of user IDs from showing their gravatars. This way, you can exclude yourself (if you have a license for your own plugins) as well as any customers who might not want to have their gravatar shown. Thanks, great suggestion, I can certainly see how that could be helpful. It’s possible for a customer to purchase while logged out so there won’t be an ID to rely on. It could either be a “logged-in” option or it might be better to approach this from a payment ID angle. The Payment stores the email address of the person who purchased, which then fetches their gravatar. Hi @sumobi , A good point! Perhaps their customer ID instead? I guess they’ll always have one of those regardless of whether they paid as a guest or when logged in? Could do! But then you’d block their gravatars from showing on all their purchases on your site. Perhaps that’s exactly what you want to do, rather than doing it on a per-download basis. @sumobi , hmmm. Yes. Quite possibly. I suppose if they opt out from wanting their gravatar displayed, they will probably want it site-wide. I know i’m speculating but trying to give an estimated guess. I know I will want my gravatar hidden site-wide as I have a license for each of my add-ons that I use internally and test update mechanism with, etc. I don’t need that to show on any download.

Comments

10 shown
Andrew Munro / AffiliateWP 2018-02-25T23:44:00+00:00

Hey Jack, Not off the top of my head. Could you try clearing out the “Maximum Gravatars To Show” field so there’s no limit? Does that then show a lot more Gravatars? Are you using the shortcode or widget? If you are using one, could you try using the other to see if that shows more Gravatars? Perhaps we can narrow down the issue. Could you show me a screenshot of your settings for the extension? Do you have a staging site that I could look at? I could then better troubleshoot by testing the code with your data. This reply was modified 8 years, 3 months ago by Andrew Munro / AffiliateWP .

Andrew Munro / AffiliateWP 2018-02-25T23:51:00+00:00

Also, has this always happened or is it a recent issue? Have you tried temporarily deactivating all other plugins except for EDD and Purchase Gravatars? I’d also recommend switching the theme temporarily. If you see more Gravtars after doing so then we’ll at least know where to start looking. I see in the HTML code for the images there are lazy load classes applied. Not 100% sure that’s the issue just yet but worth trying the above to see.

Jack – BNFW 2018-02-26T09:42:00+00:00

Hi @sumobi , Just had a bit of a fiddle and it appears that the plugin is only ever loading 20 purchase IDs and not *all* of them when setting no value in the plugins settings. This is consistent for all the downloads, most of which had sales far greater than this. This isn’t related to the number of posts that I had set to show on my site because this is set to 10 in Settings > Reading. I’ve also tested using Twenty Seventeen and with only EDD and EDD Purchase Gravatars activated along with using a shortcode in the Downloads post body instead of a widget and it always only shows 20 gravatars. Is there anything in the database I can look for to help troubleshoot? Thanks, Jack

Andrew Munro / AffiliateWP 2018-02-26T22:36:00+00:00

Thanks for doing that Jack – I’ve now replicated the issue. I’ll dig in and get a patch going. Cheers!

Andrew Munro / AffiliateWP 2018-02-26T22:50:00+00:00

Hey Jack, There’s a few other issues this plugin needs for the next update (including your other suggestion) so I’ll schedule in some time and get those completed. In the mean time, If you make a small tweak to the main plugin file I can show you how to fix this issue now: 1. Open up the main plugin file, edd-purchase-gravatars.php 2. On line 148, replace: $logs = $edd_logging->get_logs( $download_id, 'sale' ); with: $logs = $edd_logging->get_connected_logs( array( 'post_parent' => $download_id, 'log_type' => 'sale', 'posts_per_page' => -1 ) ); Here’s the exact line to change for reference https://github.com/easydigitaldownloads/edd-purchase-gravatars/blob/master/edd-purchase-gravatars.php#L148

Jack – BNFW 2018-02-27T07:16:00+00:00

Hi @sumobi , That works! Thanks very much for your help and quick support. As an aside (but as a slight extension of this request), it would be great to be able to exclude a comma separated list of user IDs from showing their gravatars. This way, you can exclude yourself (if you have a license for your own plugins) as well as any customers who might not want to have their gravatar shown.

Andrew Munro / AffiliateWP 2018-02-28T06:50:00+00:00

Thanks, great suggestion, I can certainly see how that could be helpful. It’s possible for a customer to purchase while logged out so there won’t be an ID to rely on. It could either be a “logged-in” option or it might be better to approach this from a payment ID angle. The Payment stores the email address of the person who purchased, which then fetches their gravatar.

Jack – BNFW 2018-02-28T06:52:00+00:00

Hi @sumobi , A good point! Perhaps their customer ID instead? I guess they’ll always have one of those regardless of whether they paid as a guest or when logged in?

Andrew Munro / AffiliateWP 2018-02-28T07:17:00+00:00

Could do! But then you’d block their gravatars from showing on all their purchases on your site. Perhaps that’s exactly what you want to do, rather than doing it on a per-download basis.

Jack – BNFW 2018-02-28T07:36:00+00:00

@sumobi , hmmm. Yes. Quite possibly. I suppose if they opt out from wanting their gravatar displayed, they will probably want it site-wide. I know i’m speculating but trying to give an estimated guess. I know I will want my gravatar hidden site-wide as I have a license for each of my add-ons that I use internally and test update mechanism with, etc. I don’t need that to show on any download.