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.

SQL to Determine Expiration Date/Time

Home Forums Community Forum SQL to Determine Expiration Date/Time

This topic contains 2 replies, has 2 voices. Last updated by  Tristan 3 years, 6 months ago.

Topic Author Topic
Posted: Friday Jun 28th, 2013 at 12:29 pm #52745

Can someone provide me with some SQL that I can use in my custom written mysql application to help me determine a users subscription expiration date/time?

Looks like it should be in the “wp_usermeta” table, but not sure what “meta_key” and “meta_value” to parse.

Any help is appreciated!

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Friday Jun 28th, 2013 at 11:36 pm #52782

You can use [hilite mono]get_user_option[/hilite]. http://codex.wordpress.org/Function_Reference/get_user_option

$s2member_auto_eot_time = get_user_option ("s2member_auto_eot_time"); # Auto EOT-Time for the current User (when applicable).

Buy Now transactions set an EOT time immediately, but not subscriptions. If his subscription is still going, he won’t have an EOT time, it’s set when the subscription ends. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior[/hilite]

Posted: Wednesday Jul 3rd, 2013 at 7:37 pm #52974

Thanks for the reply, but my custom application doesn’t use WordPress, so I’m actually hitting the MySQL tables directly. I’d like to build a listing of all current subscribers that are within XX days of expiration, or build lists of users that have other meta-data in common and filter out those that have expired subscriptions, etc, so what I’m really looking for is the necessary SQL to build a query that would allow me to determine the date for expiration of all users in my system.

Any insight is appreciated !

Tristan

Viewing 2 replies - 1 through 2 (of 2 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.