# s2member/261001/src/includes/menu-pages/code-samples/current-user-subscr-or-wp-id.x-php

s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls &amp; Member Access Subscriptions, version 261001. 11 lines.

- Page: https://pluginprobe.com/plugins/s2member/261001/code/src/includes/menu-pages/code-samples/current-user-subscr-or-wp-id.x-php
- Raw: https://pluginprobe.com/plugins/s2member/261001/raw/src/includes/menu-pages/code-samples/current-user-subscr-or-wp-id.x-php
- Modified: 2016-11-29T22:22:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/s2member/261001/code/src/includes/menu-pages/code-samples/current-user-subscr-or-wp-id.x-php#L10-L20`.

```
<?php echo S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID; ?>
This may output something like: I-82234JD0923423
	Or possibly something like: 8845

This is the Paid Subscription ID associated with their account.
Or, for Lifetime subscriptions sold through Buy Now buttons, this will hold the Paid Transaction ID associated with their purchase.
Or, if the User is a Free Subscriber (i.e., NOT a paying Member), this will hold their Free Subscriber ID (i.e., a WordPress® User ID).

---- s2member Shortcode Equivalent ----

[s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID" /]
```
