• Resolved bnfw

    (@voltronik)


    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]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Andrew Munro

    (@sumobi)

    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 6 years, 9 months ago by Andrew Munro.
    Plugin Author Andrew Munro

    (@sumobi)

    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.

    Thread Starter bnfw

    (@voltronik)

    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

    Plugin Author Andrew Munro

    (@sumobi)

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

    Plugin Author Andrew Munro

    (@sumobi)

    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

    Thread Starter bnfw

    (@voltronik)

    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.

    Plugin Author Andrew Munro

    (@sumobi)

    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.

    Thread Starter bnfw

    (@voltronik)

    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?

    Plugin Author Andrew Munro

    (@sumobi)

    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.

    Thread Starter bnfw

    (@voltronik)

    @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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not enough gravatars showing despite setting’ is closed to new replies.