( 64 Globals/Constants ) Global/Constant Summary | |
---|---|
public final str | S2MEMBER_CURRENT_USER_ACCESS_LABEL The current User's Membership Access Label. |
public final int | S2MEMBER_CURRENT_USER_ACCESS_LEVEL The current User's Membership Access Level. |
public final str | The current User's Custom String, associated with their Profile. |
public final str | S2MEMBER_CURRENT_USER_DISPLAY_NAME The current User's Display Name. |
public final int | S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED Indicates the number of unique Files the current User is allowed to download every X days. |
public final int | S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS Indicates the X number of days, configured by the site owner; for the current User. |
public final bool | S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED Does the current User have access to unlimited File Downloads. |
public final int | S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY Indicates the number of unique Files the current User has downloaded in the last X days. |
public final str | The current User's Email Address. |
public final str | The current User's fields, provided by s2Member. |
public final str | S2MEMBER_CURRENT_USER_FIRST_NAME The current User's First Name. |
public final int | The current User's WordPress® User ID. |
public final str | The current User's IP Address (even if/when NOT logged-in). |
public final bool | S2MEMBER_CURRENT_USER_IS_LOGGED_IN Is the current User logged-in at all. |
public final bool | S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER Is the current User logged-in as a Member. |
public final str | S2MEMBER_CURRENT_USER_LAST_NAME The current User's Last Name. |
public final str | The current User's Username. |
public final int | S2MEMBER_CURRENT_USER_LOGIN_COUNTER The number of times the current User has logged into your site. |
public final int | S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS The number of days the current User has been a paid Member. |
public final int | S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME The current User's first Paid Registration Time; regardless of which paid Level they gained access to. |
public final str | S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL A URL, which leads to the Stand-Alone Profile Modification Page. |
public final int | S2MEMBER_CURRENT_USER_REGISTRATION_DAYS The number of days the current User has had an account, period. |
public final str | S2MEMBER_CURRENT_USER_REGISTRATION_IP IP Address the current User had during registration. |
public final int | S2MEMBER_CURRENT_USER_REGISTRATION_TIME The current User's Registration Time. |
public final str | S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY The current User's Paid Subscription Gateway Code (when applicable). |
public final str | S2MEMBER_CURRENT_USER_SUBSCR_ID The current User's Paid Subscription ID (when applicable). |
public final str | S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID The current User's Paid Subscription ID (when applicable); otherwise, this will contain their WordPress® User ID. |
public final str | S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0 PayPal® value for Payment Buttons with input name: on0. |
public final str | S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1 PayPal® value for Payment Buttons with input name: on1. |
public final str | S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0 PayPal® value for Payment Buttons with input name: os0. |
public final str | S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1 PayPal® value for Payment Buttons with input name: os1. |
public final str | S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS Inline File Download extensions; as configured by the site owner. |
public final int | S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID The configured Page ID, for the Download Limit Exceeded Page. |
public final str | S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL A URL, which leads to the Download Limit Exceeded Page; as configured by the site owner. |
public final int | S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED File Downloads allowed at each Membership Level; as configured by the site owner. |
public final int | S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS File Download days, at each Membership Level; as configured by the site owner. |
public final str | Each Membership Level (Label); as configured by the site owner. |
public final str | The URL, where a User can log into their account. |
public final int | S2MEMBER_LOGIN_WELCOME_PAGE_ID The configured Page ID, for the Login Welcome Page. |
public final str | S2MEMBER_LOGIN_WELCOME_PAGE_URL The URL, which leads to the Login Welcome Page; as configured by the site owner. |
public final str | The URL, which logs the current User out of their account. |
public final int | S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID The configured Page ID, for the Membership Options Page. |
public final str | S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL A URL, which leads to the Membership Options Page; as configured by the site owner. |
public final str | PayPal® API endpoint domain (changes when Sandbox Mode is enabled). |
public final str | PayPal® API Password; as configured by the site owner. |
public final str | PayPal® API Signature; as configured by the site owner. |
public final str | PayPal® API Username; as configured by the site owner. |
public final str | PayPal® Business Email Address; as configured by the site owner. |
public final str | PayPal® endpoint domain (changes when Sandbox Mode is enabled). |
public final str | Full URL to PayPal® IPN handler, provided by s2Member. |
public final str | S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN PayPal® PDT Identity Token; as configured by the site owner. |
public final str | Full URL to PayPal® Auto-Return/PDT handler, provided by s2Member. |
public final bool | Flag indicating the AliPay® Gateway is active. |
public final bool | Flag indicating the Authorize.Net® Gateway is active. |
public final bool | Flag indicating the ccBill® Gateway is active. |
public final bool | S2MEMBER_PRO_CLICKBANK_GATEWAY Flag indicating the ClickBank® Gateway is active. |
public final bool | Flag indicating the Google® Gateway is active. |
public final bool | Flag indicating the PayPal® Gateway is active. |
public final str | Current version of s2Member Pro. |
public final str | From: Email Address, for s2Member-specific emails; as configured by the site owner. |
public final str | From: Name, for s2Member-specific emails; as configured by the site owner. |
public final str | PayPal® value for Payment Buttons with input name: invoice. |
public final str | Current version of s2Member. |
public final str | WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5 Used internally by s2Member to compare the value of all API Constants at once. |
public final str S2MEMBER_CURRENT_USER_ACCESS_LABEL
The current User's Membership Access Label.
As configured by the site owner. Each Membership Level is associated with a Membership Label (i.e. Bronze, Silver, Gold, Platinum), or whatever the site owner has configured.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_ACCESS_LABEL; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LABEL" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_ACCESS_LABEL); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_access_role")
get_user_field("s2member_access_level")
get_user_field("s2member_access_label")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ACCESS_LEVEL
WordPress® Function → wp_get_current_user()
public final int S2MEMBER_CURRENT_USER_ACCESS_LEVEL
The current User's Membership Access Level.
Negative -1
through max Membership Level number.
Negative -1
indicates they are NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_ACCESS_LEVEL; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LEVEL" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_ACCESS_LEVEL); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_access_role")
get_user_field("s2member_access_level")
get_user_field("s2member_access_label")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ACCESS_LABEL
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_CUSTOM
The current User's Custom String, associated with their Profile.
For paying Members, this should always start with the installation domain name.
This is taken from the custom=""
Attribute in your Button/Form Shortcode.
Other pipe delimited values may follow the installation domain name, if configured by the site owner.
For instance, this might be equal to something like: www.example.com|cv1|cv2|cv3
.
An empty string if NOT logged-in, or if NOT a paying Member.
<?php echo S2MEMBER_CURRENT_USER_CUSTOM; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_CUSTOM" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_CUSTOM); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_custom")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
WordPress® Function → get_user_option()
get_user_option("s2member_custom")
public final str S2MEMBER_CURRENT_USER_DISPLAY_NAME
The current User's Display Name.
This is usually a name they prefer to be known by publicly. Some Users/Members prefer to use their First Name as the Display Name, and keep their Last Name private.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_DISPLAY_NAME; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_DISPLAY_NAME); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("display_name")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
WordPress® Function → wp_get_current_user()
public final int S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
Indicates the number of unique Files the current User is allowed to download every X days.
0
means no access to File Downloads has been made available to the User.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED); </script>
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final int S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
Indicates the X number of days, configured by the site owner; for the current User.
This will be equal to 0
if NOT logged-in.
You are allowed to download <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED; ?> files, every <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS; ?> days. You've downloaded <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY; ?> files in the last <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS; ?> days.
You are allowed to download [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED" /] files, every [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /] days. You've downloaded [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /] files in the last [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /] days. You are allowed to download <script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED);</script> files, every <script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS);</script> days. You've downloaded <script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY);</script> files in the last <script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS);</script> days.
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final bool S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
Does the current User have access to unlimited File Downloads.
A value of true means the current User's allowed downloads are >= 999999999
, and false means it is not.
This is useful if you are allowing unlimited ( i.e. 999999999+
) Downloads on some Membership Levels.
You can display Unlimited
instead of a numerical value.
This will be false if NOT logged-in.
<?php if(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED) echo 'You have access to unlimited downloads.'; ?>
[s2If constant(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)] You have access to unlimited downloads. [/s2If] <script type="text/javascript"> if(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED) document.write('You have access to unlimited downloads.'); </script>
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final int S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
Indicates the number of unique Files the current User has downloaded in the last X days.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY); </script>
3.5
This does NOT include File Downloads accessed with an Advanced File Download Key.
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final str S2MEMBER_CURRENT_USER_EMAIL
The current User's Email Address.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_EMAIL; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_EMAIL" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_EMAIL); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("user_email")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_FIELDS
The current User's fields, provided by s2Member.
This holds a JSON-encoded array, containing these array keys:
id
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_IDip
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_IPreg_ip
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IPemail
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAILlogin
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGINfirst_name
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAMElast_name
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAMEdisplay_name
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAMEsubscr_id
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_IDsubscr_or_wp_id
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_IDsubscr_gateway
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_GATEWAYcustom
= value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_CUSTOMThis will be an empty JSON-encoded array if NOT logged-in.
json_decode(JSON, true)
)
<?php $fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true); echo $fields["email"]; # The current User's Email Address. echo $fields["my_unique_field_id"]; # A Custom Registration/Profile Field configured by the site owner. ?>
[s2Get user_field="id" /] [s2Get user_field="ip" /] [s2Get user_field="reg_ip" /] [s2Get user_field="email" /] [s2Get user_field="login" /] [s2Get user_field="first_name" /] [s2Get user_field="last_name" /] [s2Get user_field="display_name" /] [s2Get user_field="s2member_subscr_id" /] [s2Get user_field="s2member_subscr_wp_id" /] [s2Get user_field="s2member_subscr_gateway" /] [s2Get user_field="s2member_custom" /] [s2Get user_field="my_custom_field_id" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_FIELDS.id); document.write(S2MEMBER_CURRENT_USER_FIELDS.display_name); </script>
3.5
s2Member\API_Functions → get_user_field()
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_FIRST_NAME
The current User's First Name.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_FIRST_NAME; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_FIRST_NAME" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_FIRST_NAME); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("first_name")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
WordPress® Function → wp_get_current_user()
public final int S2MEMBER_CURRENT_USER_ID
The current User's WordPress® User ID.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_ID; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_ID" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_ID); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("id")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_IP
The current User's IP Address (even if/when NOT logged-in).
This is the current IP Address, taken from $_SERVER["REMOTE_ADDR"]
.
<?php echo S2MEMBER_CURRENT_USER_IP; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_IP" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_IP); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_registration_ip")
get_user_field("ip")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
$_SERVER["REMOTE_ADDR"]
public final bool S2MEMBER_CURRENT_USER_IS_LOGGED_IN
Is the current User logged-in at all.
True if the current User IS logged-in, else false.
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN) echo 'You ARE logged in.'; ?>
[s2If constant(S2MEMBER_CURRENT_USER_IS_LOGGED_IN)] You ARE logged-in. [/s2If] <script type="text/javascript"> if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN) document.write('You ARE logged-in.'); </script>
3.5
s2Member\API_Functions → is_user_not_logged_in()
WordPress® Function → is_user_logged_in()
WordPress® Function → wp_get_current_user()
public final bool S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER
Is the current User logged-in as a Member.
True if the current User IS logged-in with a Membership Level greater than 0
, else false.
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER) echo 'You ARE logged in at Level #1 or higher.'; ?>
[s2If constant(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER)] You ARE logged in at Level #1 or higher. [/s2If] <script type="text/javascript"> if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER) document.write('You ARE logged in at Level #1 or higher.'); </script>
3.5
s2Member\API_Functions → is_user_not_logged_in()
WordPress® Function → is_user_logged_in()
s2Member\API_Functions → user_is()
s2Member\API_Functions → user_is_not()
s2Member\API_Functions → current_user_is()
s2Member\API_Functions → current_user_is_not()
s2Member\API_Functions → current_user_is_for_blog()
s2Member\API_Functions → current_user_is_not_for_blog()
s2Member\API_Functions → current_user_cannot()
s2Member\API_Functions → current_user_cannot_for_blog()
WordPress® Function → user_can()
WordPress® Function → current_user_can()
WordPress® Function → current_user_can_for_blog()
s2Member\API_Functions → get_user_field()
get_user_field("s2member_access_role")
get_user_field("s2member_access_level")
get_user_field("s2member_access_label")
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_LAST_NAME
The current User's Last Name.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_LAST_NAME; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_LAST_NAME" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_LAST_NAME); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("last_name")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_LOGIN
The current User's Username.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_LOGIN; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_LOGIN); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("user_login")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
WordPress® Function → wp_get_current_user()
public final int S2MEMBER_CURRENT_USER_LOGIN_COUNTER
The number of times the current User has logged into your site.
Negative -1
through number of times logged-in.
Negative -1
indicates they are NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_LOGIN_COUNTER; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN_COUNTER" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_LOGIN_COUNTER); </script>
110720
s2Member\API_Functions → get_user_field()
get_user_field("s2member_login_counter")
WordPress® Function → wp_get_current_user()
public final int S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS
The number of days the current User has been a paid Member.
NOTE This is calculated using the first Paid Registration Time. A Paid Registration Time, is NOT necessarily related specifically to a Payment. s2Member records a Paid Registration Time, anytime a User acquires paid Membership Level Access.
In other words, if you create a new User inside your Dashboard at a Membership Level greater than Level #0, s2Member will record a Paid Registration Time immediately, because Membership Levels > 0, are reserved for paying Members. s2Member monitors changes to all User accounts, and records the first Paid Registration Time for each Member, at each paid Membership Level. So, s2Member stores the first Time a Member reaches each Level of paid access; and s2Member does NOT care if they actually paid, or not.
If the current User has never been at a paid Membership Level, this will be equal to 0
.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS); </script>
If you need to know the last time an actual payment was received, please use get_user_option ("s2member_last_payment_time")
.
3.5
s2Member\API_Functions → s2member_registration_time()
s2Member\API_Functions → s2member_paid_registration_time()
s2member_paid_registration_time("level1")
s2Member\API_Functions → get_user_field()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_TIME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME
WordPress® Function → get_user_option()
public final int S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME
The current User's first Paid Registration Time; regardless of which paid Level they gained access to.
NOTE A Paid Registration Time, is NOT necessarily related specifically to a Payment. s2Member records a Paid Registration Time, anytime a User acquires paid Membership Level Access.
In other words, if you create a new User inside your Dashboard at a Membership Level greater than Level #0, s2Member will record a Paid Registration Time immediately, because Membership Levels > 0, are reserved for paying Members. s2Member monitors changes to all User accounts, and records the first Paid Registration Time for each Member, at each paid Membership Level. So, s2Member stores the first Time a Member reaches each Level of paid access; and s2Member does NOT care if they actually paid, or not.
If the current User has never been at a paid Membership Level, this will be equal to 0
.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME); </script>
If you need to know the last time an actual payment was received, please use get_user_option ("s2member_last_payment_time")
.
3.5
s2Member\API_Functions → s2member_registration_time()
s2Member\API_Functions → s2member_paid_registration_time()
s2member_paid_registration_time("level1")
s2Member\API_Functions → get_user_field()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_TIME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS
WordPress® Function → get_user_option()
public final str S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
A URL, which leads to the Stand-Alone Profile Modification Page.
This is always a reference to /?s2member_profile=1
(i.e. the Stand-Alone version).
<?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
Dashboard -› s2Member -› General Options -› Profile Modifications
public final int S2MEMBER_CURRENT_USER_REGISTRATION_DAYS
The number of days the current User has had an account, period.
NOTE This is calculated with Registration Time. The Registration Time, is the time at which the Username was created for the account, that's it.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_REGISTRATION_DAYS; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS); </script>
3.5
s2Member\API_Functions → s2member_registration_time()
s2Member\API_Functions → s2member_paid_registration_time()
s2member_paid_registration_time("level1")
s2Member\API_Functions → get_user_field()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_TIME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS
WordPress® Function → get_user_option()
public final str S2MEMBER_CURRENT_USER_REGISTRATION_IP
IP Address the current User had during registration.
This is the IP Address the User had at the time they registered. It's useful when you need to know the original IP Address they used. For instance, this is needed by some affiliate tracking systems; such as iDevAffiliate.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_REGISTRATION_IP; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_IP" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_REGISTRATION_IP); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_registration_ip")
get_user_field("ip")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_IP
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LOGIN
s2Member\API_Constants → S2MEMBER_CURRENT_USER_EMAIL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIRST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_LAST_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DISPLAY_NAME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_FIELDS
$_SERVER["REMOTE_ADDR"]
public final int S2MEMBER_CURRENT_USER_REGISTRATION_TIME
The current User's Registration Time.
The Registration Time, is the time at which the Username was created for the account, that's it. There's nothing special about this. This simply returns a Unix Timestamp.
This will be equal to 0
if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_REGISTRATION_TIME; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_TIME" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_REGISTRATION_TIME); </script>
3.5
s2Member\API_Functions → s2member_registration_time()
s2Member\API_Functions → s2member_paid_registration_time()
s2member_paid_registration_time("level1")
s2Member\API_Functions → get_user_field()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS
WordPress® Function → get_user_option()
public final str S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY
The current User's Paid Subscription Gateway Code (when applicable).
Usually one of these values: paypal
, authnet
, clickbank
, google
, ccbill
, alipay
.
An empty string if NOT logged-in, or if NOT a paying Member.
<?php echo S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_subscr_gateway")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_CUSTOM
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
WordPress® Function → get_user_option()
get_user_option("s2member_subscr_gateway")
public final str S2MEMBER_CURRENT_USER_SUBSCR_ID
The current User's Paid Subscription ID (when applicable).
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_SUBSCR_ID; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_ID" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_SUBSCR_ID); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_subscr_id")
WordPress® Function → get_user_option()
get_user_option("s2member_subscr_id")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_CUSTOM
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID
The current User's Paid Subscription ID (when applicable); otherwise, this will contain their WordPress® User ID.
An empty string if NOT logged-in.
<?php echo S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_subscr_or_wp_id")
WordPress® Function → get_user_option()
get_user_option("s2member_subscr_id")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_CUSTOM
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY
s2Member\API_Constants → S2MEMBER_CURRENT_USER_REGISTRATION_IP
WordPress® Function → wp_get_current_user()
public final str S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0
PayPal® value for Payment Buttons with input name: on0
.
Used in PayPal® Modification Buttons (i.e. upgrades/downgrades).
This auto-fills the on0
value in PayPal® Button Codes. If a Button Code is presented to a logged-in Member,
this will auto-fill the value for the on0
input variable, with the string: "Referencing Customer ID".
Otherwise, it will be set to a default value of: "Originating Domain".
These five API Constants are special.
They are used by the PayPal® Button Generator for s2Member.
The INV
value can be used to auto-fill the invoice
for PayPal® Button Codes, with a unique Code~IP combination.
However, in cases where multiple Buttons are displayed on the same page, the alternative s2Member\API_Functions → s2member_value_for_pp_inv() function should be used instead.
The ON0/OS0
values, are how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged-in
when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account,
s2Member can identify their existing account, and update it; according to the modified terms in your Button Code.
These three Button Code parameters: on0
, os0
, modify
, work together in harmony. If you're using the Shortcode Format for PayPal® Buttons,
you won't even see these, because they're added internally by the Shortcode processor.
The ON1/OS1
values, are used by s2Member to identify a Customer's IP Address through IPN communications with PayPal®.
Anyway, these five API Constants are just documented here for clarity; you probably won't use any of these directly; the Button Generator pops them in.
<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0); </script>
3.5
s2Member\API_Constants → S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0
Dashboard -› s2Member -› PayPal® Buttons
public final str S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1
PayPal® value for Payment Buttons with input name: on1
.
This auto-fills the on1
value in PayPal® Button Codes.
This always contains the string: "Customer IP Address".
These five API Constants are special.
They are used by the PayPal® Button Generator for s2Member.
The INV
value can be used to auto-fill the invoice
for PayPal® Button Codes, with a unique Code~IP combination.
However, in cases where multiple Buttons are displayed on the same page, the alternative s2Member\API_Functions → s2member_value_for_pp_inv() function should be used instead.
The ON0/OS0
values, are how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged-in
when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account,
s2Member can identify their existing account, and update it; according to the modified terms in your Button Code.
These three Button Code parameters: on0
, os0
, modify
, work together in harmony. If you're using the Shortcode Format for PayPal® Buttons,
you won't even see these, because they're added internally by the Shortcode processor.
The ON1/OS1
values, are used by s2Member to identify a Customer's IP Address through IPN communications with PayPal®.
Anyway, these five API Constants are just documented here for clarity; you probably won't use any of these directly; the Button Generator pops them in.
<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1); </script>
3.5
s2Member\API_Constants → S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1
Dashboard -› s2Member -› PayPal® Buttons
public final str S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0
PayPal® value for Payment Buttons with input name: os0
.
Used in PayPal® Modification Buttons (i.e. upgrades/downgrades).
This auto-fills the os0
value in PayPal® Button Codes. If a Button Code is presented to a logged-in Member,
this will auto-fill the value for the os0
input variable, with the value of s2Member\API_Constants → S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID.
Otherwise, it will be set to a default value of $_SERVER["HTTP_HOST"]
(the originating domain name).
These five API Constants are special.
They are used by the PayPal® Button Generator for s2Member.
The INV
value can be used to auto-fill the invoice
for PayPal® Button Codes, with a unique Code~IP combination.
However, in cases where multiple Buttons are displayed on the same page, the alternative s2Member\API_Functions → s2member_value_for_pp_inv() function should be used instead.
The ON0/OS0
values, are how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged-in
when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account,
s2Member can identify their existing account, and update it; according to the modified terms in your Button Code.
These three Button Code parameters: on0
, os0
, modify
, work together in harmony. If you're using the Shortcode Format for PayPal® Buttons,
you won't even see these, because they're added internally by the Shortcode processor.
The ON1/OS1
values, are used by s2Member to identify a Customer's IP Address through IPN communications with PayPal®.
Anyway, these five API Constants are just documented here for clarity; you probably won't use any of these directly; the Button Generator pops them in.
<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0); </script>
3.5
s2Member\API_Constants → S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0
Dashboard -› s2Member -› PayPal® Buttons
public final str S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1
PayPal® value for Payment Buttons with input name: os1
.
This auto-fills the os1
value in PayPal® Button Codes,
with the Customer's IP Address, via $_SERVER["REMOTE_ADDR"]
.
These five API Constants are special.
They are used by the PayPal® Button Generator for s2Member.
The INV
value can be used to auto-fill the invoice
for PayPal® Button Codes, with a unique Code~IP combination.
However, in cases where multiple Buttons are displayed on the same page, the alternative s2Member\API_Functions → s2member_value_for_pp_inv() function should be used instead.
The ON0/OS0
values, are how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged-in
when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account,
s2Member can identify their existing account, and update it; according to the modified terms in your Button Code.
These three Button Code parameters: on0
, os0
, modify
, work together in harmony. If you're using the Shortcode Format for PayPal® Buttons,
you won't even see these, because they're added internally by the Shortcode processor.
The ON1/OS1
values, are used by s2Member to identify a Customer's IP Address through IPN communications with PayPal®.
Anyway, these five API Constants are just documented here for clarity; you probably won't use any of these directly; the Button Generator pops them in.
<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>
[s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1" /] <script type="text/javascript"> document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1); </script>
3.5
s2Member\API_Constants → S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1
Dashboard -› s2Member -› PayPal® Buttons
public final str S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Inline File Download extensions; as configured by the site owner.
<?php echo S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS; ?>
[s2Get constant="S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS" /] <script type="text/javascript"> document.write(S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS); </script>
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
Dashboard -› s2Member -› Download Options
public final int S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
The configured Page ID, for the Download Limit Exceeded Page.
This will be equal to 0
if NOT yet configured.
<?php echo S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID; ?>
[s2Get constant="S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID" /] <script type="text/javascript"> document.write(S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID); </script>
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final str S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
A URL, which leads to the Download Limit Exceeded Page; as configured by the site owner.
If the site owner has not yet configured a Download Limit Exceeded Page, this defaults to the Home Page.
<?php echo S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL; ?>
[s2Get constant="S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL" /] <script type="text/javascript"> document.write(S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL); </script>
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final int S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
File Downloads allowed at each Membership Level; as configured by the site owner.
The defaults are as follows:
S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED
= 0
S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED
= 0
S2MEMBER_LEVEL2_FILE_DOWNLOADS_ALLOWED
= 0
S2MEMBER_LEVEL3_FILE_DOWNLOADS_ALLOWED
= 0
S2MEMBER_LEVEL4_FILE_DOWNLOADS_ALLOWED
= 0
<?php echo S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED; ?>
[s2Get constant="S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED" /] <script type="text/javascript"> document.write(S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED); </script>
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final int S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
File Download days, at each Membership Level; as configured by the site owner.
The defaults are as follows:
S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED_DAYS
= 0
S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED_DAYS
= 0
S2MEMBER_LEVEL2_FILE_DOWNLOADS_ALLOWED_DAYS
= 0
S2MEMBER_LEVEL3_FILE_DOWNLOADS_ALLOWED_DAYS
= 0
S2MEMBER_LEVEL4_FILE_DOWNLOADS_ALLOWED_DAYS
= 0
At Level #1, Members are allowed to download <?php echo S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED; ?> files, every <?php echo S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED_DAYS; ?> days. You are currently at Membership Level #<?php echo S2MEMBER_CURRENT_USER_ACCESS_LEVEL; ?>. You've downloaded <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY; ?> files in the last <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS; ?> days.
At Level #1, Members are allowed to download [s2Get constant="S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED" /] files, every [s2Get constant="S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED_DAYS" /] days. You are currently at Membership Level #[s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LEVEL" /]. You've downloaded [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /] files in the last [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /] days. At Level #1, Members are allowed to download <script type="text/javascript">document.write(S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED);</script> files, every <script type="text/javascript">document.write(S2MEMBER_LEVEL1_FILE_DOWNLOADS_ALLOWED_DAYS);</script> days. You are currently at Membership Level #<script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_ACCESS_LEVEL);</script>. You've downloaded <script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY);</script> files in the last <script type="text/javascript">document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS);</script> days.
3.5
s2Member\API_Functions → s2member_user_downloads()
s2Member\API_Functions → s2member_total_downloads_of()
s2Member\API_Functions → s2member_total_unique_downloads_of()
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
s2Member\API_Constants → S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
Dashboard -› s2Member -› Download Options
public final str S2MEMBER_LEVELn_LABEL
Each Membership Level (Label); as configured by the site owner.
The defaults are as follows:
S2MEMBER_LEVEL0_LABEL
= Free SubscriberS2MEMBER_LEVEL1_LABEL
= Bronze MemberS2MEMBER_LEVEL2_LABEL
= Silver MemberS2MEMBER_LEVEL3_LABEL
= Gold MemberS2MEMBER_LEVEL4_LABEL
= Platinum Member
<?php echo S2MEMBER_LEVEL0_LABEL; ?>
[s2Get constant="S2MEMBER_LEVEL0_LABEL" /] <script type="text/javascript"> document.write(S2MEMBER_LEVEL0_LABEL); </script>
3.5
s2Member\API_Functions → get_user_field()
get_user_field("s2member_access_role")
get_user_field("s2member_access_level")
get_user_field("s2member_access_label")
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ACCESS_LEVEL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_ACCESS_LABEL
WordPress® Function → wp_get_current_user()
Dashboard -› s2Member -› General Options -› Membership Level (Labels)
public final str S2MEMBER_LOGIN_PAGE_URL
The URL, where a User can log into their account.
This is the value provided by WordPress®. It's the same as using wp_login_url()
.
<?php echo S2MEMBER_LOGIN_PAGE_URL; ?>
[s2Get constant="S2MEMBER_LOGIN_PAGE_URL" /] <script type="text/javascript"> document.write(S2MEMBER_LOGIN_PAGE_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
WordPress® Function → wp_login_url()
public final int S2MEMBER_LOGIN_WELCOME_PAGE_ID
The configured Page ID, for the Login Welcome Page.
This will be equal to 0
if NOT yet configured.
<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_ID; ?>
[s2Get constant="S2MEMBER_LOGIN_WELCOME_PAGE_ID" /] <script type="text/javascript"> document.write(S2MEMBER_LOGIN_WELCOME_PAGE_ID); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
Dashboard -› s2Member -› General Options -› Login Welcome Page
public final str S2MEMBER_LOGIN_WELCOME_PAGE_URL
The URL, which leads to the Login Welcome Page; as configured by the site owner.
If the site owner has not yet configured a Login Welcome Page, this defaults to the Home Page.
<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>
[s2Get constant="S2MEMBER_LOGIN_WELCOME_PAGE_URL" /] <script type="text/javascript"> document.write(S2MEMBER_LOGIN_WELCOME_PAGE_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
Dashboard -› s2Member -› General Options -› Login Welcome Page
public final str S2MEMBER_LOGOUT_PAGE_URL
The URL, which logs the current User out of their account.
This is the value provided by WordPress®. It's the same as using wp_logout_url()
.
<?php echo S2MEMBER_LOGOUT_PAGE_URL; ?>
[s2Get constant="S2MEMBER_LOGOUT_PAGE_URL" /] <script type="text/javascript"> document.write(S2MEMBER_LOGOUT_PAGE_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
WordPress® Function → wp_logout_url()
public final int S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
The configured Page ID, for the Membership Options Page.
This will be equal to 0
if NOT yet configured.
<?php echo S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID; ?>
[s2Get constant="S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID" /] <script type="text/javascript"> document.write(S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
Dashboard -› s2Member -› General Options -› Membership Options Page
public final str S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL
A URL, which leads to the Membership Options Page; as configured by the site owner.
If the site owner has not yet configured a Membership Options Page, this defaults to the Home Page.
<?php echo S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL; ?>
[s2Get constant="S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL" /] <script type="text/javascript"> document.write(S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_LOGIN_PAGE_URL
s2Member\API_Constants → S2MEMBER_LOGOUT_PAGE_URL
s2Member\API_Constants → S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_ID
s2Member\API_Constants → S2MEMBER_LOGIN_WELCOME_PAGE_URL
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
s2Member\API_Constants → S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
s2Member\API_Constants → S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL
Dashboard -› s2Member -› General Options -› Membership Options Page
public final str S2MEMBER_PAYPAL_API_ENDPOINT
PayPal® API endpoint domain (changes when Sandbox Mode is enabled).
api-3t.sandbox.paypal.com
.api-3t.paypal.com
.
<?php echo S2MEMBER_PAYPAL_API_ENDPOINT; ?>
[s2Get constant="S2MEMBER_PAYPAL_API_ENDPOINT" /] <script type="text/javascript"> document.write(S2MEMBER_PAYPAL_API_ENDPOINT); </script>
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_ENDPOINT
Dashboard -› s2Member -› PayPal® Options -› Account Details
public final str S2MEMBER_PAYPAL_API_PASSWORD
PayPal® API Password; as configured by the site owner.
<?php echo S2MEMBER_PAYPAL_API_PASSWORD; ?>
[s2Get constant="S2MEMBER_PAYPAL_API_PASSWORD" /] NOTE: For security purposes, this API Constant is NOT available as a JavaScript Global.
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_BUSINESS
s2Member\API_Constants → S2MEMBER_PAYPAL_API_USERNAME
s2Member\API_Constants → S2MEMBER_PAYPAL_API_SIGNATURE
Dashboard -› s2Member -› PayPal® Options -› Account Details
public final str S2MEMBER_PAYPAL_API_SIGNATURE
PayPal® API Signature; as configured by the site owner.
<?php echo S2MEMBER_PAYPAL_API_SIGNATURE; ?>
[s2Get constant="S2MEMBER_PAYPAL_API_SIGNATURE" /] NOTE: For security purposes, this API Constant is NOT available as a JavaScript Global.
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_BUSINESS
s2Member\API_Constants → S2MEMBER_PAYPAL_API_USERNAME
s2Member\API_Constants → S2MEMBER_PAYPAL_API_PASSWORD
Dashboard -› s2Member -› PayPal® Options -› Account Details
public final str S2MEMBER_PAYPAL_API_USERNAME
PayPal® API Username; as configured by the site owner.
<?php echo S2MEMBER_PAYPAL_API_USERNAME; ?>
[s2Get constant="S2MEMBER_PAYPAL_API_USERNAME" /] NOTE: For security purposes, this API Constant is NOT available as a JavaScript Global.
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_BUSINESS
s2Member\API_Constants → S2MEMBER_PAYPAL_API_PASSWORD
s2Member\API_Constants → S2MEMBER_PAYPAL_API_SIGNATURE
Dashboard -› s2Member -› PayPal® Options -› Account Details
public final str S2MEMBER_PAYPAL_BUSINESS
PayPal® Business Email Address; as configured by the site owner.
<?php echo S2MEMBER_PAYPAL_BUSINESS; ?>
[s2Get constant="S2MEMBER_PAYPAL_BUSINESS" /] <script type="text/javascript"> document.write(S2MEMBER_PAYPAL_BUSINESS); </script>
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_API_USERNAME
s2Member\API_Constants → S2MEMBER_PAYPAL_API_PASSWORD
s2Member\API_Constants → S2MEMBER_PAYPAL_API_SIGNATURE
Dashboard -› s2Member -› PayPal® Options -› Account Details
public final str S2MEMBER_PAYPAL_ENDPOINT
PayPal® endpoint domain (changes when Sandbox Mode is enabled).
www.sandbox.paypal.com
.www.paypal.com
.
<?php echo S2MEMBER_PAYPAL_ENDPOINT; ?>
[s2Get constant="S2MEMBER_PAYPAL_ENDPOINT" /] <script type="text/javascript"> document.write(S2MEMBER_PAYPAL_ENDPOINT); </script>
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_API_ENDPOINT
Dashboard -› s2Member -› PayPal® Options -› Account Details
public final str S2MEMBER_PAYPAL_NOTIFY_URL
Full URL to PayPal® IPN handler, provided by s2Member.
<?php echo S2MEMBER_PAYPAL_NOTIFY_URL; ?>
[s2Get constant="S2MEMBER_PAYPAL_NOTIFY_URL" /] <script type="text/javascript"> document.write(S2MEMBER_PAYPAL_NOTIFY_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_RETURN_URL
s2Member\API_Constants → S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN
Dashboard -› s2Member -› PayPal® Options -› IPN Integration
public final str S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN
PayPal® PDT Identity Token; as configured by the site owner.
<?php echo S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN; ?>
[s2Get constant="S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN" /] NOTE: For security purposes, this API Constant is NOT available as a JavaScript Global.
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_RETURN_URL
s2Member\API_Constants → S2MEMBER_PAYPAL_NOTIFY_URL
Dashboard -› s2Member -› PayPal® Options -› Auto-Return/PDT Integration
public final str S2MEMBER_PAYPAL_RETURN_URL
Full URL to PayPal® Auto-Return/PDT handler, provided by s2Member.
<?php echo S2MEMBER_PAYPAL_RETURN_URL; ?>
[s2Get constant="S2MEMBER_PAYPAL_RETURN_URL" /] <script type="text/javascript"> document.write(S2MEMBER_PAYPAL_RETURN_URL); </script>
3.5
s2Member\API_Constants → S2MEMBER_PAYPAL_NOTIFY_URL
s2Member\API_Constants → S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN
Dashboard -› s2Member -› PayPal® Options -› Auto-Return/PDT Integration
public final bool S2MEMBER_PRO_ALIPAY_GATEWAY
Flag indicating the AliPay® Gateway is active.
1.5
public final bool S2MEMBER_PRO_AUTHNET_GATEWAY
Flag indicating the Authorize.Net® Gateway is active.
1.5
public final bool S2MEMBER_PRO_CCBILL_GATEWAY
Flag indicating the ccBill® Gateway is active.
1.5
public final bool S2MEMBER_PRO_CLICKBANK_GATEWAY
Flag indicating the ClickBank® Gateway is active.
1.5
public final bool S2MEMBER_PRO_GOOGLE_GATEWAY
Flag indicating the Google® Gateway is active.
1.5
public final bool S2MEMBER_PRO_PAYPAL_GATEWAY
Flag indicating the PayPal® Gateway is active.
1.5
public final str S2MEMBER_PRO_VERSION
Current version of s2Member Pro.
1.0
public final str S2MEMBER_REG_EMAIL_FROM_EMAIL
From: Email Address, for s2Member-specific emails; as configured by the site owner.
<?php echo S2MEMBER_REG_EMAIL_FROM_EMAIL; ?>
[s2Get constant="S2MEMBER_REG_EMAIL_FROM_EMAIL" /] <script type="text/javascript"> document.write(S2MEMBER_REG_EMAIL_FROM_EMAIL); </script>
3.5
s2Member\API_Constants → S2MEMBER_REG_EMAIL_FROM_NAME
Dashboard -› s2Member -› General Options
public final str S2MEMBER_REG_EMAIL_FROM_NAME
From: Name, for s2Member-specific emails; as configured by the site owner.
<?php echo S2MEMBER_REG_EMAIL_FROM_NAME; ?>
[s2Get constant="S2MEMBER_REG_EMAIL_FROM_NAME" /] <script type="text/javascript"> document.write(S2MEMBER_REG_EMAIL_FROM_NAME); </script>
3.5
s2Member\API_Constants → S2MEMBER_REG_EMAIL_FROM_EMAIL
Dashboard -› s2Member -› General Options
public final str S2MEMBER_VALUE_FOR_PP_INV
PayPal® value for Payment Buttons with input name: invoice
.
This can be used to auto-fill the invoice
value in PayPal® Button Codes, with a unique Code~IP combination.
However, in cases where multiple Buttons are displayed on the same page, the alternative s2Member\API_Functions → s2member_value_for_pp_inv() function should be used instead.
Note. This API Constant is excluded from the $c[]
hash calculation used in the generation of s2Member\API_Constants → WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5.
It MUST be excluded, because the value of this particular API Constant will change too often (i.e. it changes, depending on microtime).
So, when including this API Constant in the JavaScript API as a Global, care must be taken to build an Invoice, using JavaScript
to calculate the unique time-based code, with something like: Math.round (new Date ().getTime ())
.
These five API Constants are special.
They are used by the PayPal® Button Generator for s2Member.
The INV
value can be used to auto-fill the invoice
for PayPal® Button Codes, with a unique Code~IP combination.
However, in cases where multiple Buttons are displayed on the same page, the alternative s2Member\API_Functions → s2member_value_for_pp_inv() function should be used instead.
The ON0/OS0
values, are how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged-in
when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account,
s2Member can identify their existing account, and update it; according to the modified terms in your Button Code.
These three Button Code parameters: on0
, os0
, modify
, work together in harmony. If you're using the Shortcode Format for PayPal® Buttons,
you won't even see these, because they're added internally by the Shortcode processor.
The ON1/OS1
values, are used by s2Member to identify a Customer's IP Address through IPN communications with PayPal®.
Anyway, these five API Constants are just documented here for clarity; you probably won't use any of these directly; the Button Generator pops them in.
<?php echo S2MEMBER_VALUE_FOR_PP_INV; ?>
[s2Get constant="S2MEMBER_VALUE_FOR_PP_INV" /] <script type="text/javascript"> document.write(S2MEMBER_VALUE_FOR_PP_INV); </script>
110720
s2Member\API_Functions → s2member_value_for_pp_inv()
Dashboard -› s2Member -› PayPal® Buttons
public final str S2MEMBER_VERSION
Current version of s2Member.
<?php echo S2MEMBER_VERSION; ?>
[s2Get constant="S2MEMBER_VERSION" /] <script type="text/javascript"> document.write(S2MEMBER_VERSION); </script>
3.5
s2Member → WS_PLUGIN__S2MEMBER_VERSION
public final str WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5
Used internally by s2Member to compare the value of all API Constants at once.
3.5