latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Download Counter Not Resetting

Home Forums Community Forum Download Counter Not Resetting

This topic contains 4 replies, has 2 voices. Last updated by  Raam Dev 4 years, 3 months ago.

Topic Author Topic
Posted: Sunday Sep 16th, 2012 at 8:58 pm #25522

Hello,

A couple of my customers have called in to say that on the day their account was charged – their credits were not reset to zero. I have no clue how to manually override this and fix it – what do I do to fix this and prevent it for other accounts?

Best,

Tony

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Sunday Sep 16th, 2012 at 9:14 pm #25523

I also would like to add that users are set to a recurring subscription profile on PayPal, with 45 downloads allowed every 30 days. One user only used up 22 downloads in the last term – today he was charged by PayPal but says he did not get reset back to 0 downloads.

If there was a way to see their current credits – that would be nice. I’d like to add a couple of freebies for the trouble…

Thanks!

Posted: Monday Sep 17th, 2012 at 12:09 am #25536
Raam Dev
Username: Raam
Staff Member

Hi Tony,

Unfortunately there isn’t a simple interface to the download restrictions on a per-user basis. We’re working to improve the download features in the next major release of the plugin, but for now if you want to manually reset the download restrictions for a particular user, you’ll need to run the following snippet of PHP on your site ($user_id is the numerical user ID for the user):

<?php
	delete_user_option($user_id, 's2member_file_download_access_log');
?>
Posted: Monday Sep 17th, 2012 at 10:16 am #25568

Where do I run this though?

And is this the same as going into the database, finding the ID for the user, and then searching for the metakey “s2member_file_download_access_log” and then deleting all that information in that box?

Posted: Tuesday Sep 18th, 2012 at 1:07 am #25657
Raam Dev
Username: Raam
Staff Member

Hi Tony,

You should be able to temporarily add that code to your theme’s functions.php file, load your website in a browser (so the code in that file is executed), then remove the code.

Otherwise, yes, removing the metakey directly from the database would work as well.

You can see in the WordPress Codex more information about what the delete_user_option() function does. It eventually runs this code which does a DELETE FROM command on the database.

Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.