Source Code Documentation


Global/Constant Summary | Global/Constant Detail

Package s2Member\API_Constants ( 64 Globals/Constants )


( 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

S2MEMBER_CURRENT_USER_CUSTOM

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

S2MEMBER_CURRENT_USER_EMAIL

The current User's Email Address.

public final str

S2MEMBER_CURRENT_USER_FIELDS

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

S2MEMBER_CURRENT_USER_ID

The current User's WordPress® User ID.

public final str

S2MEMBER_CURRENT_USER_IP

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

S2MEMBER_CURRENT_USER_LOGIN

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

S2MEMBER_LEVELn_LABEL

Each Membership Level (Label); as configured by the site owner.

public final str

S2MEMBER_LOGIN_PAGE_URL

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

S2MEMBER_LOGOUT_PAGE_URL

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

S2MEMBER_PAYPAL_API_ENDPOINT

PayPal® API endpoint domain (changes when Sandbox Mode is enabled).

public final str

S2MEMBER_PAYPAL_API_PASSWORD

PayPal® API Password; as configured by the site owner.

public final str

S2MEMBER_PAYPAL_API_SIGNATURE

PayPal® API Signature; as configured by the site owner.

public final str

S2MEMBER_PAYPAL_API_USERNAME

PayPal® API Username; as configured by the site owner.

public final str

S2MEMBER_PAYPAL_BUSINESS

PayPal® Business Email Address; as configured by the site owner.

public final str

S2MEMBER_PAYPAL_ENDPOINT

PayPal® endpoint domain (changes when Sandbox Mode is enabled).

public final str

S2MEMBER_PAYPAL_NOTIFY_URL

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

S2MEMBER_PAYPAL_RETURN_URL

Full URL to PayPal® Auto-Return/PDT handler, provided by s2Member.

public final bool

S2MEMBER_PRO_ALIPAY_GATEWAY

Flag indicating the AliPay® Gateway is active.

public final bool

S2MEMBER_PRO_AUTHNET_GATEWAY

Flag indicating the Authorize.Net® Gateway is active.

public final bool

S2MEMBER_PRO_CCBILL_GATEWAY

Flag indicating the ccBill® Gateway is active.

public final bool

S2MEMBER_PRO_CLICKBANK_GATEWAY

Flag indicating the ClickBank® Gateway is active.

public final bool

S2MEMBER_PRO_GOOGLE_GATEWAY

Flag indicating the Google® Gateway is active.

public final bool

S2MEMBER_PRO_PAYPAL_GATEWAY

Flag indicating the PayPal® Gateway is active.

public final str

S2MEMBER_PRO_VERSION

Current version of s2Member Pro.

public final str

S2MEMBER_REG_EMAIL_FROM_EMAIL

From: Email Address, for s2Member-specific emails; as configured by the site owner.

public final str

S2MEMBER_REG_EMAIL_FROM_NAME

From: Name, for s2Member-specific emails; as configured by the site owner.

public final str

S2MEMBER_VALUE_FOR_PP_INV

PayPal® value for Payment Buttons with input name: invoice.

public final str

S2MEMBER_VERSION

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.

( 64 Globals/Constants )
Global/Constant Detail

s2member\includes\classes\constants.inc.php at line #285

S2MEMBER_CURRENT_USER_ACCESS_LABEL

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_ACCESS_LABEL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LABEL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_ACCESS_LABEL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_access_role")

get_user_field("s2member_access_level")

get_user_field("s2member_access_label")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ACCESS_LEVEL

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #248

S2MEMBER_CURRENT_USER_ACCESS_LEVEL

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_ACCESS_LEVEL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LEVEL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_ACCESS_LEVEL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_access_role")

get_user_field("s2member_access_level")

get_user_field("s2member_access_label")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ACCESS_LABEL

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #442

S2MEMBER_CURRENT_USER_CUSTOM

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_CUSTOM; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_CUSTOM" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_CUSTOM);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_custom")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_GATEWAY

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

WordPress® Functionget_user_option()

get_user_option("s2member_custom")

[ back to top ]

s2member\includes\classes\constants.inc.php at line #667

S2MEMBER_CURRENT_USER_DISPLAY_NAME

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_DISPLAY_NAME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_DISPLAY_NAME);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("display_name")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1056

S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1200

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

This will be equal to 0 if NOT logged-in.

Quick PHP Code Sample
  1. You are allowed to download <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED; ?> files, every <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS; ?> days.
  2. You've downloaded <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY; ?> files in the last <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS; ?> days.
Shortcode & JavaScript Equivalents
  1. You are allowed to download [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED" /] files, every [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /] days.
  2. You've downloaded [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /] files in the last [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /] days.
  3. 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.
  4. 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.

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1110

S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

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.

Quick PHP Code Sample
  1. <?php
  2. if(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)
  3. echo 'You have access to unlimited downloads.';
  4. ?>
Shortcode & JavaScript Equivalents
  1. [s2If constant(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)]
  2. You have access to unlimited downloads.
  3. [/s2If]
  4. <script type="text/javascript">
  5. if(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)
  6. document.write('You have access to unlimited downloads.');
  7. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1155

S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY);
  4. </script>

Since:

3.5

Note:

This does NOT include File Downloads accessed with an Advanced File Download Key.

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #823

S2MEMBER_CURRENT_USER_EMAIL

public final str S2MEMBER_CURRENT_USER_EMAIL

The current User's Email Address.

An empty string if NOT logged-in.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_EMAIL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_EMAIL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_EMAIL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("user_email")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1010

S2MEMBER_CURRENT_USER_FIELDS

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:

This will be an empty JSON-encoded array if NOT logged-in.

Code Sample ( Using json_decode(JSON, true) )
  1. <?php
  2. $fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true);
  3. echo $fields["email"]; # The current User's Email Address.
  4. echo $fields["my_unique_field_id"]; # A Custom Registration/Profile Field configured by the site owner.
  5. ?>
Shortcode & JavaScript Equivalents
  1. [s2Get user_field="id" /]
  2. [s2Get user_field="ip" /]
  3. [s2Get user_field="reg_ip" /]
  4. [s2Get user_field="email" /]
  5. [s2Get user_field="login" /]
  6. [s2Get user_field="first_name" /]
  7. [s2Get user_field="last_name" /]
  8. [s2Get user_field="display_name" /]
  9. [s2Get user_field="s2member_subscr_id" /]
  10. [s2Get user_field="s2member_subscr_wp_id" /]
  11. [s2Get user_field="s2member_subscr_gateway" /]
  12. [s2Get user_field="s2member_custom" /]
  13. [s2Get user_field="my_custom_field_id" /]
  14. <script type="text/javascript">
  15. document.write(S2MEMBER_CURRENT_USER_FIELDS.id);
  16. document.write(S2MEMBER_CURRENT_USER_FIELDS.display_name);
  17. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #706

S2MEMBER_CURRENT_USER_FIRST_NAME

public final str S2MEMBER_CURRENT_USER_FIRST_NAME

The current User's First Name.

An empty string if NOT logged-in.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_FIRST_NAME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_FIRST_NAME" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_FIRST_NAME);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("first_name")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #948

S2MEMBER_CURRENT_USER_ID

public final int S2MEMBER_CURRENT_USER_ID

The current User's WordPress® User ID.

This will be equal to 0 if NOT logged-in.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_ID; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_ID" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_ID);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("id")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #864

S2MEMBER_CURRENT_USER_IP

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"].

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_IP; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_IP" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_IP);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_registration_ip")

get_user_field("ip")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

Superglobal $_SERVER

$_SERVER["REMOTE_ADDR"]

[ back to top ]

s2member\includes\classes\constants.inc.php at line #158

S2MEMBER_CURRENT_USER_IS_LOGGED_IN

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.

Quick PHP Code Sample
  1. <?php
  2. if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN)
  3. echo 'You ARE logged in.';
  4. ?>
Shortcode & JavaScript Equivalents
  1. [s2If constant(S2MEMBER_CURRENT_USER_IS_LOGGED_IN)]
  2. You ARE logged-in.
  3. [/s2If]
  4. <script type="text/javascript">
  5. if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN)
  6. document.write('You ARE logged-in.');
  7. </script>

Since:

3.5

See Also:

s2Member\API_Functionsis_user_not_logged_in()

WordPress® Functionis_user_logged_in()

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #213

S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER

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.

Quick PHP Code Sample
  1. <?php
  2. if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER)
  3. echo 'You ARE logged in at Level #1 or higher.';
  4. ?>
Shortcode & JavaScript Equivalents
  1. [s2If constant(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER)]
  2. You ARE logged in at Level #1 or higher.
  3. [/s2If]
  4. <script type="text/javascript">
  5. if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER)
  6. document.write('You ARE logged in at Level #1 or higher.');
  7. </script>

Since:

3.5

See Also:

s2Member\API_Functionsis_user_not_logged_in()

WordPress® Functionis_user_logged_in()

s2Member\API_Functionsuser_is()

s2Member\API_Functionsuser_is_not()

s2Member\API_Functionscurrent_user_is()

s2Member\API_Functionscurrent_user_is_not()

s2Member\API_Functionscurrent_user_is_for_blog()

s2Member\API_Functionscurrent_user_is_not_for_blog()

s2Member\API_Functionscurrent_user_cannot()

s2Member\API_Functionscurrent_user_cannot_for_blog()

WordPress® Functionuser_can()

WordPress® Functioncurrent_user_can()

WordPress® Functioncurrent_user_can_for_blog()

s2Member\API_Functionsget_user_field()

get_user_field("s2member_access_role")

get_user_field("s2member_access_level")

get_user_field("s2member_access_label")

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #745

S2MEMBER_CURRENT_USER_LAST_NAME

public final str S2MEMBER_CURRENT_USER_LAST_NAME

The current User's Last Name.

An empty string if NOT logged-in.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_LAST_NAME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_LAST_NAME" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_LAST_NAME);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("last_name")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #784

S2MEMBER_CURRENT_USER_LOGIN

public final str S2MEMBER_CURRENT_USER_LOGIN

The current User's Username.

An empty string if NOT logged-in.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_LOGIN; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_LOGIN);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("user_login")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #122

S2MEMBER_CURRENT_USER_LOGIN_COUNTER

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_LOGIN_COUNTER; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_LOGIN_COUNTER" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_LOGIN_COUNTER);
  4. </script>

Since:

110720

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_login_counter")

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #584

S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS);
  4. </script>

If you need to know the last time an actual payment was received, please use get_user_option ("s2member_last_payment_time").

Since:

3.5

See Also:

s2Member\API_Functionss2member_registration_time()

s2Member\API_Functionss2member_paid_registration_time()

s2member_paid_registration_time("level1")

s2Member\API_Functionsget_user_field()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_TIME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME

WordPress® Functionget_user_option()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #533

S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME);
  4. </script>

If you need to know the last time an actual payment was received, please use get_user_option ("s2member_last_payment_time").

Since:

3.5

See Also:

s2Member\API_Functionss2member_registration_time()

s2Member\API_Functionss2member_paid_registration_time()

s2member_paid_registration_time("level1")

s2Member\API_Functionsget_user_field()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_TIME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS

WordPress® Functionget_user_option()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1374

S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

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

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

Dashboard -› s2Member -› General Options -› Profile Modifications

[ back to top ]

s2member\includes\classes\constants.inc.php at line #625

S2MEMBER_CURRENT_USER_REGISTRATION_DAYS

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_REGISTRATION_DAYS; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_registration_time()

s2Member\API_Functionss2member_paid_registration_time()

s2member_paid_registration_time("level1")

s2Member\API_Functionsget_user_field()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_TIME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS

WordPress® Functionget_user_option()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #909

S2MEMBER_CURRENT_USER_REGISTRATION_IP

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_REGISTRATION_IP; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_IP" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_REGISTRATION_IP);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_registration_ip")

get_user_field("ip")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_IP

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LOGIN

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_EMAIL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIRST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_LAST_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DISPLAY_NAME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_FIELDS

Superglobal $_SERVER

$_SERVER["REMOTE_ADDR"]

[ back to top ]

s2member\includes\classes\constants.inc.php at line #483

S2MEMBER_CURRENT_USER_REGISTRATION_TIME

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_REGISTRATION_TIME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_TIME" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_REGISTRATION_TIME);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_registration_time()

s2Member\API_Functionss2member_paid_registration_time()

s2member_paid_registration_time("level1")

s2Member\API_Functionsget_user_field()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS

WordPress® Functionget_user_option()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #400

S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_subscr_gateway")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_CUSTOM

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

WordPress® Functionget_user_option()

get_user_option("s2member_subscr_gateway")

[ back to top ]

s2member\includes\classes\constants.inc.php at line #323

S2MEMBER_CURRENT_USER_SUBSCR_ID

public final str S2MEMBER_CURRENT_USER_SUBSCR_ID

The current User's Paid Subscription ID (when applicable).

An empty string if NOT logged-in.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_SUBSCR_ID; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_ID" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_SUBSCR_ID);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_subscr_id")

WordPress® Functionget_user_option()

get_user_option("s2member_subscr_id")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_CUSTOM

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_GATEWAY

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #362

S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_subscr_or_wp_id")

WordPress® Functionget_user_option()

get_user_option("s2member_subscr_id")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_CUSTOM

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_SUBSCR_GATEWAY

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_REGISTRATION_IP

WordPress® Functionwp_get_current_user()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2208

S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0

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

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0

Dashboard -› s2Member -› PayPal® Buttons

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2321

S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1

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

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1

Dashboard -› s2Member -› PayPal® Buttons

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2266

S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0

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_ConstantsS2MEMBER_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_Functionss2member_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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0

Dashboard -› s2Member -› PayPal® Buttons

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2376

S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1

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

Quick PHP Code Sample
  1. <?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1

Dashboard -› s2Member -› PayPal® Buttons

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1780

S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

public final str S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Inline File Download extensions; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1255

S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1429

S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1685

S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

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:

Quick PHP Code Sample
  1. <?php echo S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1738

S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS

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:

Quick PHP Code Sample
  1. 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.
  2. 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.
Shortcode & JavaScript Equivalents
  1. 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.
  2. 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.
  3. 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.
  4. 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.

Since:

3.5

See Also:

s2Member\API_Functionss2member_user_downloads()

s2Member\API_Functionss2member_total_downloads_of()

s2Member\API_Functionss2member_total_unique_downloads_of()

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS

Dashboard -› s2Member -› Download Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1633

S2MEMBER_LEVELn_LABEL

public final str S2MEMBER_LEVELn_LABEL

Each Membership Level (Label); as configured by the site owner.

The defaults are as follows:

Quick PHP Code Sample
  1. <?php echo S2MEMBER_LEVEL0_LABEL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_LEVEL0_LABEL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_LEVEL0_LABEL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_Functionsget_user_field()

get_user_field("s2member_access_role")

get_user_field("s2member_access_level")

get_user_field("s2member_access_label")

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ACCESS_LEVEL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_ACCESS_LABEL

WordPress® Functionwp_get_current_user()

Dashboard -› s2Member -› General Options -› Membership Level (Labels)

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1589

S2MEMBER_LOGIN_PAGE_URL

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().

Quick PHP Code Sample
  1. <?php echo S2MEMBER_LOGIN_PAGE_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_LOGIN_PAGE_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_LOGIN_PAGE_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

WordPress® Functionwp_login_url()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1335

S2MEMBER_LOGIN_WELCOME_PAGE_ID

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_LOGIN_WELCOME_PAGE_ID; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_LOGIN_WELCOME_PAGE_ID" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_LOGIN_WELCOME_PAGE_ID);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

Dashboard -› s2Member -› General Options -› Login Welcome Page

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1509

S2MEMBER_LOGIN_WELCOME_PAGE_URL

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_LOGIN_WELCOME_PAGE_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_LOGIN_WELCOME_PAGE_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

Dashboard -› s2Member -› General Options -› Login Welcome Page

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1549

S2MEMBER_LOGOUT_PAGE_URL

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().

Quick PHP Code Sample
  1. <?php echo S2MEMBER_LOGOUT_PAGE_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_LOGOUT_PAGE_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_LOGOUT_PAGE_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

WordPress® Functionwp_logout_url()

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1295

S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

Dashboard -› s2Member -› General Options -› Membership Options Page

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1469

S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL

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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_LOGIN_PAGE_URL

s2Member\API_ConstantsS2MEMBER_LOGOUT_PAGE_URL

s2Member\API_ConstantsS2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_ID

s2Member\API_ConstantsS2MEMBER_LOGIN_WELCOME_PAGE_URL

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID

s2Member\API_ConstantsS2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL

s2Member\API_ConstantsS2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL

Dashboard -› s2Member -› General Options -› Membership Options Page

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1979

S2MEMBER_PAYPAL_API_ENDPOINT

public final str S2MEMBER_PAYPAL_API_ENDPOINT

PayPal® API endpoint domain (changes when Sandbox Mode is enabled).

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_API_ENDPOINT; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_API_ENDPOINT" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_PAYPAL_API_ENDPOINT);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_ENDPOINT

Dashboard -› s2Member -› PayPal® Options -› Account Details

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2035

S2MEMBER_PAYPAL_API_PASSWORD

public final str S2MEMBER_PAYPAL_API_PASSWORD

PayPal® API Password; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_API_PASSWORD; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_API_PASSWORD" /]
  2. NOTE: For security purposes,
  3. this API Constant is NOT available as a JavaScript Global.

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_BUSINESS

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_USERNAME

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_SIGNATURE

Dashboard -› s2Member -› PayPal® Options -› Account Details

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2063

S2MEMBER_PAYPAL_API_SIGNATURE

public final str S2MEMBER_PAYPAL_API_SIGNATURE

PayPal® API Signature; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_API_SIGNATURE; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_API_SIGNATURE" /]
  2. NOTE: For security purposes,
  3. this API Constant is NOT available as a JavaScript Global.

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_BUSINESS

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_USERNAME

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_PASSWORD

Dashboard -› s2Member -› PayPal® Options -› Account Details

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2007

S2MEMBER_PAYPAL_API_USERNAME

public final str S2MEMBER_PAYPAL_API_USERNAME

PayPal® API Username; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_API_USERNAME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_API_USERNAME" /]
  2. NOTE: For security purposes,
  3. this API Constant is NOT available as a JavaScript Global.

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_BUSINESS

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_PASSWORD

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_SIGNATURE

Dashboard -› s2Member -› PayPal® Options -› Account Details

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1919

S2MEMBER_PAYPAL_BUSINESS

public final str S2MEMBER_PAYPAL_BUSINESS

PayPal® Business Email Address; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_BUSINESS; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_BUSINESS" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_PAYPAL_BUSINESS);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_USERNAME

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_PASSWORD

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_SIGNATURE

Dashboard -› s2Member -› PayPal® Options -› Account Details

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1949

S2MEMBER_PAYPAL_ENDPOINT

public final str S2MEMBER_PAYPAL_ENDPOINT

PayPal® endpoint domain (changes when Sandbox Mode is enabled).

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_ENDPOINT; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_ENDPOINT" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_PAYPAL_ENDPOINT);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_API_ENDPOINT

Dashboard -› s2Member -› PayPal® Options -› Account Details

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1862

S2MEMBER_PAYPAL_NOTIFY_URL

public final str S2MEMBER_PAYPAL_NOTIFY_URL

Full URL to PayPal® IPN handler, provided by s2Member.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_NOTIFY_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_NOTIFY_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_PAYPAL_NOTIFY_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_RETURN_URL

s2Member\API_ConstantsS2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN

Dashboard -› s2Member -› PayPal® Options -› IPN Integration

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2090

S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN

public final str S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN

PayPal® PDT Identity Token; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN" /]
  2. NOTE: For security purposes,
  3. this API Constant is NOT available as a JavaScript Global.

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_RETURN_URL

s2Member\API_ConstantsS2MEMBER_PAYPAL_NOTIFY_URL

Dashboard -› s2Member -› PayPal® Options -› Auto-Return/PDT Integration

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1890

S2MEMBER_PAYPAL_RETURN_URL

public final str S2MEMBER_PAYPAL_RETURN_URL

Full URL to PayPal® Auto-Return/PDT handler, provided by s2Member.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_PAYPAL_RETURN_URL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_PAYPAL_RETURN_URL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_PAYPAL_RETURN_URL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_PAYPAL_NOTIFY_URL

s2Member\API_ConstantsS2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN

Dashboard -› s2Member -› PayPal® Options -› Auto-Return/PDT Integration

[ back to top ]

pro\s2member-pro\includes\classes\gateways\alipay\alipay-constants.inc.php at line #69

S2MEMBER_PRO_ALIPAY_GATEWAY

public final bool S2MEMBER_PRO_ALIPAY_GATEWAY

Flag indicating the AliPay® Gateway is active.

Since:

1.5

[ back to top ]

pro\s2member-pro\includes\classes\gateways\authnet\authnet-constants.inc.php at line #69

S2MEMBER_PRO_AUTHNET_GATEWAY

public final bool S2MEMBER_PRO_AUTHNET_GATEWAY

Flag indicating the Authorize.Net® Gateway is active.

Since:

1.5

[ back to top ]

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-constants.inc.php at line #69

S2MEMBER_PRO_CCBILL_GATEWAY

public final bool S2MEMBER_PRO_CCBILL_GATEWAY

Flag indicating the ccBill® Gateway is active.

Since:

1.5

[ back to top ]

pro\s2member-pro\includes\classes\gateways\clickbank\clickbank-constants.inc.php at line #69

S2MEMBER_PRO_CLICKBANK_GATEWAY

public final bool S2MEMBER_PRO_CLICKBANK_GATEWAY

Flag indicating the ClickBank® Gateway is active.

Since:

1.5

[ back to top ]

pro\s2member-pro\includes\classes\gateways\google\google-constants.inc.php at line #69

S2MEMBER_PRO_GOOGLE_GATEWAY

public final bool S2MEMBER_PRO_GOOGLE_GATEWAY

Flag indicating the Google® Gateway is active.

Since:

1.5

[ back to top ]

pro\s2member-pro\includes\classes\gateways\paypal\paypal-constants.inc.php at line #69

S2MEMBER_PRO_PAYPAL_GATEWAY

public final bool S2MEMBER_PRO_PAYPAL_GATEWAY

Flag indicating the PayPal® Gateway is active.

Since:

1.5

[ back to top ]

pro\s2member-pro\includes\classes\constants.inc.php at line #72

S2MEMBER_PRO_VERSION

public final str S2MEMBER_PRO_VERSION

Current version of s2Member Pro.

Since:

1.0

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1834

S2MEMBER_REG_EMAIL_FROM_EMAIL

public final str S2MEMBER_REG_EMAIL_FROM_EMAIL

From: Email Address, for s2Member-specific emails; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_REG_EMAIL_FROM_EMAIL; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_REG_EMAIL_FROM_EMAIL" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_REG_EMAIL_FROM_EMAIL);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_REG_EMAIL_FROM_NAME

Dashboard -› s2Member -› General Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #1807

S2MEMBER_REG_EMAIL_FROM_NAME

public final str S2MEMBER_REG_EMAIL_FROM_NAME

From: Name, for s2Member-specific emails; as configured by the site owner.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_REG_EMAIL_FROM_NAME; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_REG_EMAIL_FROM_NAME" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_REG_EMAIL_FROM_NAME);
  4. </script>

Since:

3.5

See Also:

s2Member\API_ConstantsS2MEMBER_REG_EMAIL_FROM_EMAIL

Dashboard -› s2Member -› General Options

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2150

S2MEMBER_VALUE_FOR_PP_INV

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_Functionss2member_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_ConstantsWS_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_Functionss2member_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.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_VALUE_FOR_PP_INV; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_VALUE_FOR_PP_INV" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_VALUE_FOR_PP_INV);
  4. </script>

Since:

110720

See Also:

s2Member\API_Functionss2member_value_for_pp_inv()

Dashboard -› s2Member -› PayPal® Buttons

[ back to top ]

s2member\includes\classes\constants.inc.php at line #91

S2MEMBER_VERSION

public final str S2MEMBER_VERSION

Current version of s2Member.

Quick PHP Code Sample
  1. <?php echo S2MEMBER_VERSION; ?>
Shortcode & JavaScript Equivalents
  1. [s2Get constant="S2MEMBER_VERSION" /]
  2. <script type="text/javascript">
  3. document.write(S2MEMBER_VERSION);
  4. </script>

Since:

3.5

See Also:

s2MemberWS_PLUGIN__S2MEMBER_VERSION

[ back to top ]

s2member\includes\classes\constants.inc.php at line #2390

WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5

public final str WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5

Used internally by s2Member to compare the value of all API Constants at once.

Since:

3.5

[ back to top ]

Source Code Documentation


Global/Constant Summary | Global/Constant Detail