s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) - Version 151210

Version Description

= v151210 =

(Maintenance Release) Upgrade immediately.

Download this release

Release Info

Developer JasWSInc
Plugin Icon 128x128 s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Version 151210
Comparing to
See all releases

Code changes from version 150925 to 151210

Files changed (194) hide show
  1. changelog.md +72 -0
  2. checksum.txt +1 -1
  3. includes/classes/access-cap-times.inc.php +1 -1
  4. includes/classes/admin-css-js-in.inc.php +1 -1
  5. includes/classes/admin-css-js.inc.php +1 -1
  6. includes/classes/admin-lockouts.inc.php +1 -1
  7. includes/classes/admin-notices.inc.php +1 -1
  8. includes/classes/auto-eots.inc.php +12 -5
  9. includes/classes/aweber-e.inc.php +1 -1
  10. includes/classes/aweber.inc.php +1 -1
  11. includes/classes/brute-force.inc.php +1 -1
  12. includes/classes/cache.inc.php +1 -1
  13. includes/classes/catgs-sp.inc.php +1 -1
  14. includes/classes/catgs.inc.php +1 -1
  15. includes/classes/check-activation.inc.php +1 -1
  16. includes/classes/constants.inc.php +1 -1
  17. includes/classes/cron-jobs-in.inc.php +14 -14
  18. includes/classes/cron-jobs.inc.php +1 -1
  19. includes/classes/css-js-in.inc.php +1 -1
  20. includes/classes/css-js-themes.inc.php +1 -1
  21. includes/classes/css-js.inc.php +1 -1
  22. includes/classes/custom-reg-fields-4bp.inc.php +1 -1
  23. includes/classes/custom-reg-fields.inc.php +1 -1
  24. includes/classes/database.inc.php +1 -1
  25. includes/classes/email-configs.inc.php +9 -10
  26. includes/classes/files-in.inc.php +2 -2
  27. includes/classes/files.inc.php +1 -1
  28. includes/classes/getresponse.inc.php +1 -1
  29. includes/classes/installation.inc.php +4 -5
  30. includes/classes/ip-restrictions.inc.php +1 -1
  31. includes/classes/labels.inc.php +1 -1
  32. includes/classes/list-server-base.inc.php +1 -1
  33. includes/classes/list-servers.inc.php +1 -1
  34. includes/classes/login-checks.inc.php +1 -1
  35. includes/classes/login-customizations.inc.php +1 -1
  36. includes/classes/login-redirects-r.inc.php +1 -1
  37. includes/classes/login-redirects.inc.php +1 -1
  38. includes/classes/mailchimp-o.inc.php +1 -1
  39. includes/classes/mailchimp.inc.php +1 -1
  40. includes/classes/menu-pages-rs.inc.php +2 -2
  41. includes/classes/menu-pages-tb.inc.php +1 -1
  42. includes/classes/menu-pages.inc.php +3 -3
  43. includes/classes/meta-box-saves.inc.php +1 -1
  44. includes/classes/meta-box-security.inc.php +1 -1
  45. includes/classes/meta-boxes.inc.php +1 -1
  46. includes/classes/mms-patches.inc.php +1 -1
  47. includes/classes/mo-page-in.inc.php +1 -1
  48. includes/classes/mo-page.inc.php +1 -1
  49. includes/classes/no-cache.inc.php +1 -1
  50. includes/classes/op-notices.inc.php +1 -1
  51. includes/classes/option-forces.inc.php +1 -1
  52. includes/classes/pages-sp.inc.php +1 -1
  53. includes/classes/pages.inc.php +1 -1
  54. includes/classes/paypal-notify-in-billing-agreement-signup.inc.php +1 -1
  55. includes/classes/paypal-notify-in-cart.inc.php +1 -1
  56. includes/classes/paypal-notify-in-express-checkout.inc.php +1 -1
  57. includes/classes/paypal-notify-in-rec-profile-creation-w-level.inc.php +1 -1
  58. includes/classes/paypal-notify-in-send-money.inc.php +1 -1
  59. includes/classes/paypal-notify-in-sp-refund-reversal.inc.php +6 -6
  60. includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php +11 -11
  61. includes/classes/paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php +6 -6
  62. includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php +9 -9
  63. includes/classes/paypal-notify-in-subscr-or-rp-payment-failed-w-level.inc.php +1 -1
  64. includes/classes/paypal-notify-in-subscr-or-rp-payment-w-level.inc.php +6 -6
  65. includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php +27 -27
  66. includes/classes/paypal-notify-in-virtual-terminal.inc.php +1 -1
  67. includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php +13 -13
  68. includes/classes/paypal-notify-in-web-accept-sp.inc.php +14 -14
  69. includes/classes/paypal-notify-in.inc.php +13 -25
  70. includes/classes/paypal-notify.inc.php +1 -1
  71. includes/classes/paypal-return-in-no-tx-data.inc.php +1 -1
  72. includes/classes/paypal-return-in-proxy-ty-email.inc.php +1 -1
  73. includes/classes/paypal-return-in-proxy-x-preview.inc.php +1 -1
  74. includes/classes/paypal-return-in-subscr-modify-w-level.inc.php +4 -4
  75. includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php +5 -5
  76. includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php +4 -4
  77. includes/classes/paypal-return-in-web-accept-sp.inc.php +4 -4
  78. includes/classes/paypal-return-in.inc.php +8 -20
  79. includes/classes/paypal-return.inc.php +1 -1
  80. includes/classes/paypal-utilities.inc.php +1 -1
  81. includes/classes/posts-sp.inc.php +1 -1
  82. includes/classes/posts.inc.php +1 -1
  83. includes/classes/profile-in.inc.php +1 -1
  84. includes/classes/profile-mods-4bp-in.inc.php +1 -1
  85. includes/classes/profile-mods-4bp.inc.php +1 -1
  86. includes/classes/profile-mods-in.inc.php +1 -1
  87. includes/classes/profile-mods.inc.php +1 -1
  88. includes/classes/profile.inc.php +1 -1
  89. includes/classes/ptags-sp.inc.php +1 -1
  90. includes/classes/ptags.inc.php +1 -1
  91. includes/classes/querys.inc.php +1 -1
  92. includes/classes/readmes.inc.php +1 -1
  93. includes/classes/register-access.inc.php +1 -1
  94. includes/classes/register-in.inc.php +1 -1
  95. includes/classes/register.inc.php +1 -1
  96. includes/classes/registration-times.inc.php +1 -1
  97. includes/classes/registrations.inc.php +4 -7
  98. includes/classes/return-templates.inc.php +1 -1
  99. includes/classes/roles-caps.inc.php +1 -1
  100. includes/classes/ruris-sp.inc.php +1 -1
  101. includes/classes/ruris.inc.php +1 -1
  102. includes/classes/s-badge-status-in.inc.php +1 -1
  103. includes/classes/s-badge-status.inc.php +1 -1
  104. includes/classes/sc-eots-in.inc.php +1 -1
  105. includes/classes/sc-eots.inc.php +1 -1
  106. includes/classes/sc-files-in.inc.php +1 -1
  107. includes/classes/sc-files.inc.php +1 -1
  108. includes/classes/sc-gets-in.inc.php +1 -1
  109. includes/classes/sc-gets.inc.php +1 -1
  110. includes/classes/sc-if-conds-in.inc.php +1 -1
  111. includes/classes/sc-if-conds.inc.php +1 -1
  112. includes/classes/sc-keys-in.inc.php +1 -1
  113. includes/classes/sc-keys.inc.php +1 -1
  114. includes/classes/sc-paypal-button-e.inc.php +1 -1
  115. includes/classes/sc-paypal-button-in.inc.php +2 -2
  116. includes/classes/sc-paypal-button.inc.php +1 -1
  117. includes/classes/sc-profile-in.inc.php +1 -1
  118. includes/classes/sc-profile.inc.php +1 -1
  119. includes/classes/sc-s-badge-in.inc.php +1 -1
  120. includes/classes/sc-s-badge.inc.php +1 -1
  121. includes/classes/security.inc.php +1 -1
  122. includes/classes/sp-access.inc.php +1 -1
  123. includes/classes/ssl-in.inc.php +1 -1
  124. includes/classes/ssl.inc.php +1 -1
  125. includes/classes/systematics-sp.inc.php +1 -1
  126. includes/classes/systematics.inc.php +1 -1
  127. includes/classes/tracking-codes.inc.php +1 -1
  128. includes/classes/tracking-cookies-in.inc.php +1 -1
  129. includes/classes/tracking-cookies.inc.php +1 -1
  130. includes/classes/translations.inc.php +1 -1
  131. includes/classes/user-access.inc.php +1 -1
  132. includes/classes/user-deletions.inc.php +6 -5
  133. includes/classes/user-new-in.inc.php +1 -1
  134. includes/classes/user-new.inc.php +1 -1
  135. includes/classes/user-notes.inc.php +1 -1
  136. includes/classes/user-securities.inc.php +1 -1
  137. includes/classes/users-list-in.inc.php +1 -1
  138. includes/classes/users-list.inc.php +1 -1
  139. includes/classes/utilities.inc.php +1 -1
  140. includes/classes/utils-arrays.inc.php +1 -1
  141. includes/classes/utils-captchas.inc.php +1 -1
  142. includes/classes/utils-conds.inc.php +1 -1
  143. includes/classes/utils-css.inc.php +1 -1
  144. includes/classes/utils-cur.inc.php +1 -1
  145. includes/classes/utils-dirs.inc.php +1 -1
  146. includes/classes/utils-encryption.inc.php +1 -1
  147. includes/classes/utils-forms.inc.php +1 -1
  148. includes/classes/utils-gets.inc.php +1 -1
  149. includes/classes/utils-html.inc.php +1 -1
  150. includes/classes/utils-logs.inc.php +14 -10
  151. includes/classes/utils-s2o.inc.php +4 -3
  152. includes/classes/utils-strings.inc.php +14 -2
  153. includes/classes/utils-time.inc.php +60 -29
  154. includes/classes/utils-urls.inc.php +1 -1
  155. includes/classes/utils-users.inc.php +1 -1
  156. includes/classes/wp-footer.inc.php +1 -1
  157. includes/codes.inc.php +1 -1
  158. includes/externals/mailchimp/Mailchimp-o.php +1 -1
  159. includes/externals/markdown/nc-markdown.inc.php +2 -2
  160. includes/funcs.inc.php +1 -1
  161. includes/functions/api-functions.inc.php +1 -1
  162. includes/functions/class-autoloader.inc.php +1 -1
  163. includes/functions/deprecated.inc.php +1 -1
  164. includes/functions/pluggables.inc.php +1 -1
  165. includes/hooks.inc.php +2 -1
  166. includes/jquery/jquery.json-ps/jquery.json-ps.js +1 -1
  167. includes/jquery/jquery.sprintf/jquery.sprintf.js +1 -1
  168. includes/jquery/jquery.ui-effects/jquery.ui-effects.js +1 -1
  169. includes/menu-pages/api-ops.inc.php +1 -1
  170. includes/menu-pages/down-ops.inc.php +1 -1
  171. includes/menu-pages/els-ops.inc.php +1 -1
  172. includes/menu-pages/gen-ops.inc.php +3 -1
  173. includes/menu-pages/integrations.inc.php +1 -1
  174. includes/menu-pages/logs.inc.php +6 -6
  175. includes/menu-pages/menu-pages-s-min.js +1 -1
  176. includes/menu-pages/menu-pages-s.css +1 -1
  177. includes/menu-pages/menu-pages-s.js +11 -1
  178. includes/menu-pages/menu-pages.css +34 -1
  179. includes/menu-pages/menu-pages.js +1 -1
  180. includes/menu-pages/mms-ops.inc.php +1 -1
  181. includes/menu-pages/paypal-buttons.inc.php +2 -2
  182. includes/menu-pages/paypal-ops.inc.php +1 -1
  183. includes/menu-pages/res-ops.inc.php +1 -1
  184. includes/menu-pages/scripting.inc.php +1 -1
  185. includes/menu-pages/start.inc.php +48 -80
  186. includes/menu-pages/trk-ops.inc.php +1 -1
  187. includes/menu-pages/updates.inc.php +1 -1
  188. includes/s2member.css +1 -1
  189. includes/s2member.js +1 -1
  190. includes/syscon.inc.php +1 -1
  191. includes/translations/s2member.pot +125 -120
  192. readme.txt +97 -25
  193. s2member-o.php +1 -1
  194. s2member.php +23 -18
changelog.md CHANGED
@@ -1,3 +1,75 @@
1
= v150925 =
2
3
- (s2Member/s2Member Pro) **WP v4.3 Compat.** This release corrects a minor backward compatibility issue with versions of WordPress before v4.3, and for installations of s2Member that still use the `%%user_pass%%` Replacement Code in their New User Email notification. See [this GitHub issue](https://github.com/websharks/s2member/issues/710) if you'd like additional details.
1
+ = v151210 =
2
+
3
+ - (s2Member/s2Member Pro) **WP/PHP Compat:** Updated for compatibility with WordPress 4.4 and PHP v7.0. Note that s2Member and s2Member Pro also remain compatible with WordPress 4.3 and PHP 5.2. However, PHP 5.5+ is strongly recommended.
4
+
5
+ - (s2Member Pro) **New Feature! EOT Renewal/Reminder Email Notifications:** This release adds a long-awaited feature which allows you to configure & send EOT Renewal/Reminder Email notifications to your customers; to let them know their account with you will expire soon.
6
+
7
+ It's possible to configure one or more notifications, each with a different set of recipients, and a different subject and message body. Notifications can be sent out X days before the EOT occurs, _the day_ of the EOT, or X days after the EOT has already occurred; e.g., to encourage renewals.
8
+
9
+ See: **Dashboard → s2Member → Stripe Options → EOT Renewal/Reminder Email(s)**
10
+ _Also works with PayPal Pro, Authorize.Net, and ClickBank._
11
+
12
+ Props @clavaque @KTS915 @raamdev @patdumond @kristineds @pagelab @chronicelite @csexplorer17 @radven, and all of our great supporters. See [this GitHub issue](https://github.com/websharks/s2member/issues/122#issuecomment-161531763).
13
+
14
+ - (s2Member/s2Member Pro) **Cleanup:** This release improves the list of Other Gateways; moving deprecated payment gateways to the bottom of the list and improving the display of the list overall. Props @kristineds @clavaque. For further details, see [this GitHub issue](https://github.com/websharks/s2member/issues/715).
15
+
16
+ - (s2Member/s2Member Pro) **Bug Fix:** This release corrects an "Insecure Content Warning" that may have appeared in certain portions of the s2Member Dashboard panels whenever you accessed your Dashboard over the `https` protocol. The issue was seen in Google Chrome and it was simply a `<form>` tag that referenced the s2Member mailing list. This is now hidden by default if you access the Dashboard over SSL, in order to avoid this warning. Props @patdumond for reporting. Props @renzms for fixing. See also [this GitHub issue](https://github.com/websharks/s2member/issues/678) if you'd like additional details.
17
+
18
+ - (s2Member Pro) **Stripe Locale:** This release adjusts the Stripe overlay so that it will automatically display in the language associated with a visitor's country. This was accomplished by setting the Stripe Checkout variable `locale: 'auto'` as suggested in [this GitHub issue](https://github.com/websharks/s2member/issues/728). Props @renzms
19
+
20
+ - (s2Member Pro) **Stripe Bug Fix:** This release improves the way Stripe Image Branding and Stripe Statement Descriptions are applied whenever you intentionally leave them empty. It also changes the default value of Stripe Image Branding to an empty string; which will tell Stripe to use the account-level default value that you configured in your Stripe Dashboard in favor of that which you configure with s2Member. The choice is still yours, but this release sets what others have told us are better default values. See also [this GitHub issue](https://github.com/websharks/s2member/issues/666) if you'd like additional details.
21
+
22
+ - (s2Member Pro) **Stripe Enhancement:** This release makes it possible to configure the Stripe "Remember Me" functionality with s2Member; i.e., it is now possible to turn this on/off if you so desire. See also [this GitHub issue](https://github.com/websharks/s2member/issues/357) for details.
23
+
24
+ - (s2Member Pro) **Stripe Enhancement:** This release makes it possible for you to tell Stripe to collect a customer's full Billing Address and/or full Shipping Address. See [this GitHub issue](https://github.com/websharks/s2member/issues/667) for additional details.
25
+
26
+ - (s2Member/s2Member Pro) **UI Clarity:** This release improves the way the New User Email Notification panel behaves whenever you also have Custom Passwords enabled with s2Member. The New User Email Notification is only sent when Custom Passwords are off, so this panel should disable itself whenever that is the case. Fixed in this release. Props @raamdev See also: [this GitHub issue](https://github.com/websharks/s2member/issues/739) if you'd like additional details.
27
+
28
+ - (s2Member/s2Member Pro) **Bug Fix:** This release resolves a minor issue for developers running Vagrant and VVV with symlink plugins. Props @magbicaleman ~ See [this GitHub issue](https://github.com/websharks/s2member/issues/717) for further details.
29
+
30
+ - (s2Member Pro) **Conflict Resolution:** This release resolves a conflict with the WP Full Stripe plugin and any other plugins that already load an existing copy of the Stripe SDK at runtime; in concert with s2Member Pro. See [this GitHub issue](https://github.com/websharks/s2member/issues/750) if you'd like additional details.
31
+
32
+ - (s2Member/s2Member Pro) **New Log File:** This release of s2Member adds a new log file that keeps track of all automatic EOTs that occur through the underlying CRON job. The new log file is named: `auto-eot-system.log` and you can learn more about this file and view it from: **Dashboard → s2Member → Log Files (Debug) → Log Viewer**. Props @raamdev ~ See [this GitHub issue](https://github.com/websharks/s2member/issues/759) if you'd like additional details.
33
+
34
+ - (s2Member Pro) **`[s2Member-List /]` Bug Fix:** This release resolves a problem in the `[s2Member-List /]` shortcode whenever it is configured to search Custom Fields generated with s2Member. Props @patdumond @renzms. See [this GitHub issue](https://github.com/websharks/s2member/issues/765) if you'd like additional details.
35
+
36
+ - (s2Member Pro) **Stripe Enhancement:** This release updates s2Member's Stripe integration so that any Buy Now transaction spawns a Stripe popup with the amount and full description filled within the popup itself as well. Props @raamdev. See [this GitHub issue](https://github.com/websharks/s2member/issues/749) for further details.
37
+
38
+ - (s2Member/s2Member Pro) **WP v4.3 Compat.** This release addresses a minor conflict between functionality provided by s2Member and that of the WordPress core itself. Whenever you change a user's password by editing their account, you can choose to send them an email about this change (or not). Since WordPress v4.3, the WordPress core will _also_ send a more vague email to notify the user of a password change, which is not customizable. This release disables that default email notification in favor of the more helpful and customizable email message that can be sent by s2Member. Simply tick the "Reset Password & Resend New User Email Notification" checkbox whenever you are editing a user. Props @patdumond for reporting. See also [this GitHub issue](https://github.com/websharks/s2member/issues/777) if you'd like additional details.
39
+
40
+ - (s2Member/s2Member Pro) **PayPal Compat.** This release resolves a conflict between s2Member and a nasty bug at PayPal.com that came to light recently. In some cases, customers reported that clicking the "Continue" button at PayPal.com simply reloaded the page and gave no response. We found that this was attributed to a bug on the PayPal side (see [792](https://github.com/websharks/s2member/issues/792)). To work around this bug, we are using a new default value for the `ns="1"` shortcode attribute in PayPal Pro-Forms and PayPal Buttons. The new default value is `ns="0"`, which seems to work around this bug for the time being. Props @patdumond @raamdev for reporting and testing this fix. See also [full report here](https://github.com/websharks/s2member/issues/792).
41
+
42
+ - `ns="0"` (**new default**) = prompt for a shipping address, but do not require one
43
+ - `ns="1"` (old default) = do not prompt for a shipping address whatsoever
44
+
45
+ See also: **Dashboard → s2Member → PayPal Pro-Forms → PayPal Shortcode Attributes (Explained)**
46
+
47
+ - (s2Member/s2Member Pro) **Getting Started:** The old Quick Start Guide was renamed to "Getting Started" in this release. It was also cleaned up and improved a bit; i.e., brought up-to-date. In addition, there is a new welcome message for first-time users of the software that invites them to read over the Getting Started page before they begin. Props @raamdev. See also: [this GitHub issue](https://github.com/websharks/s2member/issues/655).
48
+
49
+ - (s2Member Pro) **Stripe Bug Fix:** This release corrects a problem with Stripe refund and chargeback notification handling. s2Member Pro will now receive and handle Stripe refund and/or chargeback events (through your existing Webhook) as expected.
50
+
51
+ See: **Dashboard → s2Member → Stripe Options → Automatic EOT Behavior** for options that allow you to control the way in which s2Member should respond whenever a refund is processed, or when a dispute (chargeback) occurs at Stripe.
52
+
53
+ Props @ElizWS and @tubiz w/ AffiliateWP. See also [this GitHub issue](https://github.com/websharks/s2member/issues/706).
54
+
55
+ - (s2Member Pro) **`[s2Member-List /]`** Added the ability to search usermeta data too. For instance, you can now search `first_name`, `last_name`, `nickname`, `description`, `s2member_subscr_id`, `s2member_custom`, etc, etc. See [this GitHub issue](https://github.com/websharks/s2member/issues/596).
56
+
57
+ _**Note:** The `first_name`, `last_name`, and `nickname` columns are now a part of the default value for the `search_columns=""` attribute in the `[s2Member-List /]` shortcode. See also: [this GitHub issue](https://github.com/websharks/s2member/issues/596). Props @patdumond for her ideas._
58
+
59
+ - (s2Member Pro) **`[s2Member-List /]`** There are some new `orderby=""` options. You may now choose to order the list by: `first_name`, `last_name`, or `nickname`.
60
+
61
+ - (s2Member Pro) **`[s2Member-List /]`** It is now possible to search through s2Member Custom Registration/Profile Fields that may contain an array of values; i.e., you can now search _any_ Custom Registration/Profile Field in s2Member. For instance, if a field is designed to accept multiple selections, or you provide a set of multiple checkbox options. See also: [this GitHub issue](https://github.com/websharks/s2member/issues/555).
62
+
63
+ - (s2Member Pro) **`[s2Member-List /]` Bug Fix:** Meta fields that contained a timestamp were being displayed by the `date_i18n()` function in WP core. However, the time offset calculation was wrong; i.e., not a match to the local time configured by your installation of WordPress. Fixed in this release.
64
+
65
+ - (s2Member Pro) **`[s2Member-List /]` Bug Fix:** Minor formatting corrections for replacement codes made available for the `link_*=""` attributes in the `[s2Member-List /]` shortcode.
66
+
67
+ - (s2Member Pro) **`[s2Member-List /]`:** It is now possible to search for an exact match by surrounding your search query with double quotes; e.g., `"john doe"` (in quotes, for an exact match), instead of the default behavior, which is `*john doe*` behind-the-scenes; i.e., a fuzzy match.
68
+
69
+ - (s2Member Pro) **`[s2Member-List /]`:** Several behind-the-scenes performance enhancements.
70
+
71
+ - (s2Member/s2Member Pro) **PHP 7 Compat.** This release of s2Member removes its use of the `/e` modifier in calls to `preg_replace()`, which was deprecated in PHP 5.5 and has been removed in PHP 7. Props @bridgeport. See also: [this GitHub issue](https://github.com/websharks/s2member/issues/415).
72
+
73
= v150925 =
74
75
- (s2Member/s2Member Pro) **WP v4.3 Compat.** This release corrects a minor backward compatibility issue with versions of WordPress before v4.3, and for installations of s2Member that still use the `%%user_pass%%` Replacement Code in their New User Email notification. See [this GitHub issue](https://github.com/websharks/s2member/issues/710) if you'd like additional details.
checksum.txt CHANGED
@@ -1 +1 @@
1
- 7ca3eb527170d3c241213d269e2dfcd4
1
+ 95ca15ddfbbd89600e1ac81f5ac3e577
includes/classes/access-cap-times.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Access CAP Times.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Access CAP Times.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/admin-css-js-in.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Administrative CSS/JS for menu pages (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Administrative CSS/JS for menu pages (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/admin-css-js.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Administrative CSS/JS for menu pages.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Administrative CSS/JS for menu pages.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/admin-lockouts.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Locks Users/Members out of admin panels.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Locks Users/Members out of admin panels.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/admin-notices.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Enqueues/displays administrative notices.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Enqueues/displays administrative notices.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/auto-eots.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's Auto-EOT System *(EOT = End Of Term)*.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -127,11 +127,15 @@ if(!class_exists('c_ws_plugin__s2member_auto_eots'))
127
delete_user_option($user_id, 's2member_last_auto_eot_time');
128
delete_user_option($user_id, 's2member_auto_eot_time');
129
130
if(!$user->has_cap('administrator') /* Do NOT process Administrator accounts. */)
131
{
132
if($GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_eot_behavior'] === 'demote')
133
{
134
$eot_del_type = 'auto-eot-cancellation-expiration-demotion'; // Set EOT/Del type.
135
136
$custom = get_user_option('s2member_custom', $user_id);
137
$subscr_gateway = get_user_option('s2member_subscr_gateway', $user_id);
@@ -183,11 +187,11 @@ if(!class_exists('c_ws_plugin__s2member_auto_eots'))
183
if($subscr_gateway && $subscr_id) // Also note the Paid Subscr. Gateway/ID so there is a reference left behind here.
184
c_ws_plugin__s2member_user_notes::append_user_notes($user_id, 'Paid Subscr. ID @ time of demotion: '.$subscr_gateway.' → '.$subscr_id);
185
186
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls'] && is_array($cv = preg_split('/\|/', $custom)))
187
{
188
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls']) as $url) // Handle EOT Notifications.
189
190
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode('auto-eot-cancellation-expiration-demotion')), $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($subscr_id)), $url)))
191
if(($url = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->first_name)), $url)) && ($url = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->last_name)), $url)))
192
if(($url = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode(trim($user->first_name.' '.$user->last_name))), $url)))
193
if(($url = preg_replace('/%%user_email%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->user_email)), $url)))
@@ -204,7 +208,7 @@ if(!class_exists('c_ws_plugin__s2member_auto_eots'))
204
c_ws_plugin__s2member_utils_urls::remote($url);
205
}
206
}
207
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_recipients'] && is_array($cv = preg_split('/\|/', $custom)))
208
{
209
$email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
210
c_ws_plugin__s2member_email_configs::email_config_release();
@@ -239,7 +243,7 @@ if(!class_exists('c_ws_plugin__s2member_auto_eots'))
239
$msg .= 'cv8: %%cv8%%'."\n";
240
$msg .= 'cv9: %%cv9%%';
241
242
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs('auto-eot-cancellation-expiration-demotion'), $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($subscr_id), $msg)))
243
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($subscr_baid), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($subscr_cid), $msg)))
244
if(($msg = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->first_name), $msg)) && ($msg = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->last_name), $msg)))
245
if(($msg = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(trim($user->first_name.' '.$user->last_name)), $msg)))
@@ -267,6 +271,7 @@ if(!class_exists('c_ws_plugin__s2member_auto_eots'))
267
else if($GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_eot_behavior'] === 'delete')
268
{
269
$eot_del_type = $GLOBALS['ws_plugin__s2member_eot_del_type'] = 'auto-eot-cancellation-expiration-deletion';
270
271
foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $__v;
272
do_action('ws_plugin__s2member_during_auto_eot_system_during_before_delete', get_defined_vars());
@@ -290,6 +295,8 @@ if(!class_exists('c_ws_plugin__s2member_auto_eots'))
290
foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $__v;
291
do_action('ws_plugin__s2member_during_auto_eot_system', get_defined_vars());
292
unset($__refs, $__v); // Housekeeping.
293
}
294
}
295
}
3
* s2Member's Auto-EOT System *(EOT = End Of Term)*.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
127
delete_user_option($user_id, 's2member_last_auto_eot_time');
128
delete_user_option($user_id, 's2member_auto_eot_time');
129
130
+ $log_entry = array('user' => (array)$user); // Intialize.
131
+ $log_entry['auto_eot_time'] = $auto_eot_time; // Record EOT time.
132
+
133
if(!$user->has_cap('administrator') /* Do NOT process Administrator accounts. */)
134
{
135
if($GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_eot_behavior'] === 'demote')
136
{
137
$eot_del_type = 'auto-eot-cancellation-expiration-demotion'; // Set EOT/Del type.
138
+ $log_entry['eot_del_type'] = $eot_del_type; // Deleting user in this case.
139
140
$custom = get_user_option('s2member_custom', $user_id);
141
$subscr_gateway = get_user_option('s2member_subscr_gateway', $user_id);
187
if($subscr_gateway && $subscr_id) // Also note the Paid Subscr. Gateway/ID so there is a reference left behind here.
188
c_ws_plugin__s2member_user_notes::append_user_notes($user_id, 'Paid Subscr. ID @ time of demotion: '.$subscr_gateway.' → '.$subscr_id);
189
190
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls'])
191
{
192
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls']) as $url) // Handle EOT Notifications.
193
194
+ if(($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $custom, true)) && ($url = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode('auto-eot-cancellation-expiration-demotion')), $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($subscr_id)), $url)))
195
if(($url = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->first_name)), $url)) && ($url = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->last_name)), $url)))
196
if(($url = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode(trim($user->first_name.' '.$user->last_name))), $url)))
197
if(($url = preg_replace('/%%user_email%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->user_email)), $url)))
208
c_ws_plugin__s2member_utils_urls::remote($url);
209
}
210
}
211
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_recipients'])
212
{
213
$email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
214
c_ws_plugin__s2member_email_configs::email_config_release();
243
$msg .= 'cv8: %%cv8%%'."\n";
244
$msg .= 'cv9: %%cv9%%';
245
246
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $custom)) && ($msg = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs('auto-eot-cancellation-expiration-demotion'), $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($subscr_id), $msg)))
247
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($subscr_baid), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($subscr_cid), $msg)))
248
if(($msg = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->first_name), $msg)) && ($msg = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->last_name), $msg)))
249
if(($msg = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(trim($user->first_name.' '.$user->last_name)), $msg)))
271
else if($GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_eot_behavior'] === 'delete')
272
{
273
$eot_del_type = $GLOBALS['ws_plugin__s2member_eot_del_type'] = 'auto-eot-cancellation-expiration-deletion';
274
+ $log_entry['eot_del_type'] = $eot_del_type; // Deleting user in this case.
275
276
foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $__v;
277
do_action('ws_plugin__s2member_during_auto_eot_system_during_before_delete', get_defined_vars());
295
foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $__v;
296
do_action('ws_plugin__s2member_during_auto_eot_system', get_defined_vars());
297
unset($__refs, $__v); // Housekeeping.
298
+
299
+ c_ws_plugin__s2member_utils_logs::log_entry('auto-eot-system', $log_entry);
300
}
301
}
302
}
includes/classes/aweber-e.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* AWeber (Old via Email)
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* AWeber (Old via Email)
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/aweber.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* AWeber
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* AWeber
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/brute-force.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's Brute Force protection routines.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's Brute Force protection routines.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/cache.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's caching routines.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's caching routines.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/catgs-sp.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's Category protection routines *(for specific Categories)*.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's Category protection routines *(for specific Categories)*.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/catgs.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's Category protection routines *(for current page)*.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's Category protection routines *(for current page)*.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/check-activation.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's self re-activation routines.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's self re-activation routines.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/constants.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's API Constants *(for site owners)*.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's API Constants *(for site owners)*.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/cron-jobs-in.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Cron routines handled by s2Member (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -15,9 +15,9 @@
15
* @since 3.5
16
*/
17
if(!defined('WPINC')) // MUST have WordPress.
18
- exit ("Do not access this file directly.");
19
20
- if(!class_exists("c_ws_plugin__s2member_cron_jobs_in"))
21
{
22
/**
23
* Cron routines handled by s2Member (inner processing routines).
@@ -33,7 +33,7 @@ if(!class_exists("c_ws_plugin__s2member_cron_jobs_in"))
33
* @package s2Member\Cron_Jobs
34
* @since 3.5
35
*
36
- * @attaches-to ``add_filter("cron_schedules");``
37
*
38
* @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
39
*
@@ -42,12 +42,12 @@ if(!class_exists("c_ws_plugin__s2member_cron_jobs_in"))
42
public static function extend_cron_schedules($schedules = array())
43
{
44
foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $__v;
45
- do_action("ws_plugin__s2member_before_extend_cron_schedules", get_defined_vars());
46
unset($__refs, $__v);
47
48
- $array = array("every10m" => array("interval" => 600, "display" => "Every 10 Minutes"));
49
50
- return apply_filters("ws_plugin__s2member_extend_cron_schedules", array_merge($array, $schedules), get_defined_vars());
51
}
52
53
/**
@@ -56,22 +56,22 @@ if(!class_exists("c_ws_plugin__s2member_cron_jobs_in"))
56
* @package s2Member\Cron_Jobs
57
* @since 3.5
58
*
59
- * @attaches-to ``add_action("init");``
60
*/
61
public static function auto_eot_system_via_cron()
62
{
63
- do_action("ws_plugin__s2member_before_auto_eot_system_via_cron", get_defined_vars());
64
65
- if(!empty($_GET["s2member_auto_eot_system_via_cron"]))
66
{
67
- if($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"])
68
{
69
c_ws_plugin__s2member_auto_eots::auto_eot_system(); // Process.
70
- do_action("ws_plugin__s2member_during_auto_eot_system_via_cron", get_defined_vars());
71
}
72
exit(); // Clean exit.
73
}
74
- do_action("ws_plugin__s2member_after_auto_eot_system_via_cron", get_defined_vars());
75
}
76
}
77
- }
3
* Cron routines handled by s2Member (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
15
* @since 3.5
16
*/
17
if(!defined('WPINC')) // MUST have WordPress.
18
+ exit ('Do not access this file directly.');
19
20
+ if(!class_exists('c_ws_plugin__s2member_cron_jobs_in'))
21
{
22
/**
23
* Cron routines handled by s2Member (inner processing routines).
33
* @package s2Member\Cron_Jobs
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_filter('cron_schedules');``
37
*
38
* @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
39
*
42
public static function extend_cron_schedules($schedules = array())
43
{
44
foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $__v;
45
+ do_action('ws_plugin__s2member_before_extend_cron_schedules', get_defined_vars());
46
unset($__refs, $__v);
47
48
+ $array = array('every10m' => array('interval' => 600, 'display' => 'Every 10 Minutes'));
49
50
+ return apply_filters('ws_plugin__s2member_extend_cron_schedules', array_merge($array, $schedules), get_defined_vars());
51
}
52
53
/**
56
* @package s2Member\Cron_Jobs
57
* @since 3.5
58
*
59
+ * @attaches-to ``add_action('init');``
60
*/
61
public static function auto_eot_system_via_cron()
62
{
63
+ do_action('ws_plugin__s2member_before_auto_eot_system_via_cron', get_defined_vars());
64
65
+ if(!empty($_GET['s2member_auto_eot_system_via_cron']))
66
{
67
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['auto_eot_system_enabled'])
68
{
69
c_ws_plugin__s2member_auto_eots::auto_eot_system(); // Process.
70
+ do_action('ws_plugin__s2member_during_auto_eot_system_via_cron', get_defined_vars());
71
}
72
exit(); // Clean exit.
73
}
74
+ do_action('ws_plugin__s2member_after_auto_eot_system_via_cron', get_defined_vars());
75
}
76
}
77
+ }
includes/classes/cron-jobs.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Cron routines handled by s2Member.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Cron routines handled by s2Member.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/css-js-in.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* CSS/JS loading handlers for s2Member (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* CSS/JS loading handlers for s2Member (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/css-js-themes.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* CSS/JS integrations with theme.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* CSS/JS integrations with theme.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/css-js.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* CSS/JS loading handlers for s2Member.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* CSS/JS loading handlers for s2Member.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/custom-reg-fields-4bp.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Custom Registration/Profile Fields for BuddyPress integration.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Custom Registration/Profile Fields for BuddyPress integration.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/custom-reg-fields.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Custom Registration/Profile Fields for s2Member.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Custom Registration/Profile Fields for s2Member.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/database.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Database routines.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Database routines.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/email-configs.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Email configurations for s2Member.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -216,8 +216,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
216
* @since 110707
217
*
218
* @param string|int $user_id A numeric WordPress User ID.
219
- * @param string $user_pass Optional. A plain text version of the User's password.
220
- * If omitted, only the administrative notification will be sent.
221
* @param array $notify An array of directives. Must be non-empty, with at least one of these values `user,admin`.
222
* @param string $user_email Optional. This defaults to the user's currently configured email address.
223
* @return bool True if all required parameters are supplied, else false.
@@ -277,7 +276,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
277
else $wp_set_pass_url = wp_lostpassword_url(); // Default behavior; and older versions of WordPress.
278
279
$fields = get_user_option ('s2member_custom_fields', $user_id);
280
- $cv = preg_split ('/\|/', get_user_option ('s2member_custom', $user_id));
281
282
$role = c_ws_plugin__s2member_user_access::user_access_role($user);
283
$label = c_ws_plugin__s2member_user_access::user_access_label($user);
@@ -289,7 +288,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
289
$user_ip = $_SERVER['REMOTE_ADDR'];
290
291
if (($sbj = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_email_subject']))
292
- if (($sbj = preg_replace ('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $sbj)))
293
if (($sbj = preg_replace ('/%%wp_set_pass_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($wp_set_pass_url), $sbj)))
294
if (($sbj = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $sbj)))
295
if (($sbj = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $sbj)))
@@ -311,7 +310,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
311
break; // Empty; we can stop here.
312
313
if (($msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_email_message']))
314
- if (($msg = preg_replace ('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)))
315
if (($msg = preg_replace ('/%%wp_set_pass_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($wp_set_pass_url), $msg)))
316
if (($msg = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $msg)))
317
if (($msg = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $msg)))
@@ -347,7 +346,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
347
if (in_array('admin', $notify, true) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_recipients'])
348
{
349
$fields = get_user_option ('s2member_custom_fields', $user_id);
350
- $cv = preg_split ('/\|/', get_user_option ('s2member_custom', $user_id));
351
352
$role = c_ws_plugin__s2member_user_access::user_access_role($user);
353
$label = c_ws_plugin__s2member_user_access::user_access_label($user);
@@ -359,7 +358,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
359
$user_ip = $_SERVER['REMOTE_ADDR'];
360
361
if (($rec = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_recipients']))
362
- if (($rec = preg_replace ('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $rec)))
363
if (($rec = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $rec)))
364
if (($rec = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $rec)))
365
if (($rec = preg_replace ('/%%label%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($label), $rec)))
@@ -380,7 +379,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
380
break; // Empty; we can stop here.
381
382
if (($sbj = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_subject']))
383
- if (($sbj = preg_replace ('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $sbj)))
384
if (($sbj = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $sbj)))
385
if (($sbj = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $sbj)))
386
if (($sbj = preg_replace ('/%%label%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($label), $sbj)))
@@ -401,7 +400,7 @@ if (!class_exists ('c_ws_plugin__s2member_email_configs'))
401
break; // Empty; we can stop here.
402
403
if (($msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_message']))
404
- if (($msg = preg_replace ('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)))
405
if (($msg = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $msg)))
406
if (($msg = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $msg)))
407
if (($msg = preg_replace ('/%%label%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($label), $msg)))
3
* Email configurations for s2Member.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
216
* @since 110707
217
*
218
* @param string|int $user_id A numeric WordPress User ID.
219
+ * @param string $user_pass Optional; plain text pass. No longer suggested, by here for back compat.
220
* @param array $notify An array of directives. Must be non-empty, with at least one of these values `user,admin`.
221
* @param string $user_email Optional. This defaults to the user's currently configured email address.
222
* @return bool True if all required parameters are supplied, else false.
276
else $wp_set_pass_url = wp_lostpassword_url(); // Default behavior; and older versions of WordPress.
277
278
$fields = get_user_option ('s2member_custom_fields', $user_id);
279
+ $custom = get_user_option ('s2member_custom', $user_id);
280
281
$role = c_ws_plugin__s2member_user_access::user_access_role($user);
282
$label = c_ws_plugin__s2member_user_access::user_access_label($user);
288
$user_ip = $_SERVER['REMOTE_ADDR'];
289
290
if (($sbj = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_email_subject']))
291
+ if (($sbj = c_ws_plugin__s2member_utils_strings::fill_cvs($sbj, $custom)))
292
if (($sbj = preg_replace ('/%%wp_set_pass_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($wp_set_pass_url), $sbj)))
293
if (($sbj = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $sbj)))
294
if (($sbj = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $sbj)))
310
break; // Empty; we can stop here.
311
312
if (($msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_email_message']))
313
+ if (($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $custom)))
314
if (($msg = preg_replace ('/%%wp_set_pass_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($wp_set_pass_url), $msg)))
315
if (($msg = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $msg)))
316
if (($msg = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $msg)))
346
if (in_array('admin', $notify, true) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_recipients'])
347
{
348
$fields = get_user_option ('s2member_custom_fields', $user_id);
349
+ $custom = get_user_option ('s2member_custom', $user_id);
350
351
$role = c_ws_plugin__s2member_user_access::user_access_role($user);
352
$label = c_ws_plugin__s2member_user_access::user_access_label($user);
358
$user_ip = $_SERVER['REMOTE_ADDR'];
359
360
if (($rec = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_recipients']))
361
+ if (($rec = c_ws_plugin__s2member_utils_strings::fill_cvs($rec, $custom)))
362
if (($rec = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $rec)))
363
if (($rec = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $rec)))
364
if (($rec = preg_replace ('/%%label%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($label), $rec)))
379
break; // Empty; we can stop here.
380
381
if (($sbj = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_subject']))
382
+ if (($sbj = c_ws_plugin__s2member_utils_strings::fill_cvs($sbj, $custom)))
383
if (($sbj = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $sbj)))
384
if (($sbj = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $sbj)))
385
if (($sbj = preg_replace ('/%%label%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($label), $sbj)))
400
break; // Empty; we can stop here.
401
402
if (($msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['new_user_admin_email_message']))
403
+ if (($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $custom)))
404
if (($msg = preg_replace ('/%%wp_login_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs (wp_login_url ()), $msg)))
405
if (($msg = preg_replace ('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($role), $msg)))
406
if (($msg = preg_replace ('/%%label%%/i', c_ws_plugin__s2member_utils_strings::esc_refs ($label), $msg)))
includes/classes/files-in.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* File Download routines for s2Member (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -1599,4 +1599,4 @@ if(!class_exists('c_ws_plugin__s2member_files_in'))
1599
);
1600
}
1601
}
1602
- }
3
* File Download routines for s2Member (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
1599
);
1600
}
1601
}
1602
+ }
includes/classes/files.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* File Download routines for s2Member.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* File Download routines for s2Member.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/getresponse.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* GetResponse
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* GetResponse
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/installation.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Installation routines for s2Member.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -118,14 +118,13 @@ if(!class_exists('c_ws_plugin__s2member_installation'))
118
119
c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, array('blog|network:plugins.php', 'blog|network:ws-plugin--s2member-start', 'blog|network:ws-plugin--s2member-mms-ops', 'blog|network:ws-plugin--s2member-gen-ops', 'blog|network:ws-plugin--s2member-res-ops'));
120
}
121
- else // Otherwise (initial activation); we'll help the Site Owner out by giving them a link to the Quick Start Guide.
122
{
123
$notice = '<strong>Note:</strong> s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the <strong>Screen Options</strong> tab <em>(upper right-hand corner)</em>. With WordPress Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration/Profile Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.';
124
-
125
c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, 'blog:users.php', FALSE, FALSE, TRUE);
126
127
- $notice = '<strong>s2Member</strong> v'.esc_html(WS_PLUGIN__S2MEMBER_VERSION).' has been <strong>activated</strong>. Nice work!<br />';
128
- $notice .= 'Have fun, <a href="'.esc_attr(admin_url('/admin.php?page=ws-plugin--s2member-start')).'">read the Quick Start Guide</a>, and make some money! :-)';
129
130
c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, array('blog|network:plugins.php', 'blog|network:ws-plugin--s2member-start', 'blog|network:ws-plugin--s2member-mms-ops', 'blog|network:ws-plugin--s2member-gen-ops', 'blog|network:ws-plugin--s2member-res-ops'));
131
}
3
* Installation routines for s2Member.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
118
119
c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, array('blog|network:plugins.php', 'blog|network:ws-plugin--s2member-start', 'blog|network:ws-plugin--s2member-mms-ops', 'blog|network:ws-plugin--s2member-gen-ops', 'blog|network:ws-plugin--s2member-res-ops'));
120
}
121
+ else // Otherwise (initial activation); we'll help the Site Owner out by giving them a link to the Getting Started section.
122
{
123
$notice = '<strong>Note:</strong> s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the <strong>Screen Options</strong> tab <em>(upper right-hand corner)</em>. With WordPress Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration/Profile Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.';
124
c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, 'blog:users.php', FALSE, FALSE, TRUE);
125
126
+ $notice = '<strong>s2Member v'.esc_html(WS_PLUGIN__S2MEMBER_VERSION).' has been activated. Nice work!</strong><br />';
127
+ $notice .= 'We suggest a review of the "Getting Started" page to familiarize yourself with s2Member terminology and basic configuration.<br />&#8627;&nbsp; Would you want to review now? &nbsp;&nbsp;&nbsp; <a href="'.esc_attr(admin_url('/admin.php?page=ws-plugin--s2member-start')).'"><strong>Yes (explain)</strong></a>';
128
129
c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, array('blog|network:plugins.php', 'blog|network:ws-plugin--s2member-start', 'blog|network:ws-plugin--s2member-mms-ops', 'blog|network:ws-plugin--s2member-gen-ops', 'blog|network:ws-plugin--s2member-res-ops'));
130
}
includes/classes/ip-restrictions.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* IP Restrictions.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* IP Restrictions.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/labels.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Membership Level Labels.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Membership Level Labels.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/list-server-base.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* List Server Base
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* List Server Base
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/list-servers.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* List Server integrations.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* List Server integrations.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/login-checks.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Login checks.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Login checks.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/login-customizations.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Login customizations.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Login customizations.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/login-redirects-r.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Login redirect removals.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Login redirect removals.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/login-redirects.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Login redirections.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Login redirections.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/mailchimp-o.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* MailChimp (Old API)
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* MailChimp (Old API)
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/mailchimp.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* MailChimp
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* MailChimp
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/menu-pages-rs.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Right-side for Menu Pages.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -41,7 +41,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages_rs"))
41
42
ob_start(); // output buffer these so we can display a toggler conditionally.
43
44
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["updates"])
45
{
46
echo '<div class="ws-menu-page-updates">' . "\n";
47
include_once dirname (dirname (__FILE__)) . "/menu-pages/updates.inc.php";
3
* Right-side for Menu Pages.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
41
42
ob_start(); // output buffer these so we can display a toggler conditionally.
43
44
+ if (!is_ssl() && $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["updates"])
45
{
46
echo '<div class="ws-menu-page-updates">' . "\n";
47
include_once dirname (dirname (__FILE__)) . "/menu-pages/updates.inc.php";
includes/classes/menu-pages-tb.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Toolbox for Menu Pages.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Toolbox for Menu Pages.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/menu-pages.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Administrative menu pages.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -152,7 +152,7 @@ if(!class_exists('c_ws_plugin__s2member_menu_pages'))
152
'create_users', $menu, 'c_ws_plugin__s2member_menu_pages::start_page', $GLOBALS['WS_PLUGIN__']['s2member']['c']['dir_url'].'/images/brand-favicon.png');
153
154
if(apply_filters('ws_plugin__s2member_during_add_admin_options_add_start_page', TRUE, get_defined_vars()))
155
- add_submenu_page($menu, 's2Member Quick-Start Guide', 'Quick-Start Guide', 'create_users', 'ws-plugin--s2member-start', 'c_ws_plugin__s2member_menu_pages::start_page');
156
157
if(apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_1', TRUE, get_defined_vars()))
158
add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
@@ -496,7 +496,7 @@ if(!class_exists('c_ws_plugin__s2member_menu_pages'))
496
}
497
498
/**
499
- * Builds and handles the Quick Start page.
500
*
501
* @package s2Member\Menu_Pages
502
* @since 3.5
3
* Administrative menu pages.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
152
'create_users', $menu, 'c_ws_plugin__s2member_menu_pages::start_page', $GLOBALS['WS_PLUGIN__']['s2member']['c']['dir_url'].'/images/brand-favicon.png');
153
154
if(apply_filters('ws_plugin__s2member_during_add_admin_options_add_start_page', TRUE, get_defined_vars()))
155
+ add_submenu_page($menu, 'Getting Started w/ s2Member', 'Getting Started', 'create_users', 'ws-plugin--s2member-start', 'c_ws_plugin__s2member_menu_pages::start_page');
156
157
if(apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_1', TRUE, get_defined_vars()))
158
add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
496
}
497
498
/**
499
+ * Builds and handles the Getting Started page.
500
*
501
* @package s2Member\Menu_Pages
502
* @since 3.5
includes/classes/meta-box-saves.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Meta box saves.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Meta box saves.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/meta-box-security.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Security meta box.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Security meta box.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/meta-boxes.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Administrative Meta Boxes.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Administrative Meta Boxes.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/mms-patches.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Main Multisite patches.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Main Multisite patches.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/mo-page-in.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Membership Options Page (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Membership Options Page (inner processing routines).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/mo-page.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Membership Options Page.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Membership Options Page.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/no-cache.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* No-cache routines.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* No-cache routines.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/op-notices.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Option panel notices.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Option panel notices.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/option-forces.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* Forces WordPress options.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* Forces WordPress options.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/pages-sp.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's Page protection routines *(for specific Pages)*.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's Page protection routines *(for specific Pages)*.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/pages.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's Page protection routines *(for current Page)*.
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's Page protection routines *(for current Page)*.
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-billing-agreement-signup.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-cart.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-express-checkout.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-rec-profile-creation-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-send-money.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-sp-refund-reversal.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -70,11 +70,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal'))
70
Since this routine ignores the processing check, it is *possible* that Refund/Reversal Notification URLs will be contacted more than once.
71
If you're writing scripts that depend on Refund/Reversal Notifications, please keep this in mind.
72
*/
73
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['sp_ref_rev_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
74
{
75
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['sp_ref_rev_notification_urls']) as $url)
76
77
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_id'])), $url)))
78
if(($url = preg_replace('/%%parent_txn_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_baid'])), $url)) && ($url = preg_replace('/%%parent_txn_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_cid'])), $url)))
79
if(($url = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_number'])), $url)) && ($url = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_name'])), $url)))
80
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
@@ -89,7 +89,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal'))
89
90
$paypal['s2member_log'][] = 'Specific Post/Page ~ Refund/Reversal Notification URLs have been processed.';
91
}
92
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['sp_ref_rev_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
93
{
94
$msg = $sbj = '(s2Member / API Notification Email) - Specific Post/Page ~ Refund/Reversal';
95
$msg .= "\n\n"; // Spacing in the message body.
@@ -120,7 +120,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal'))
120
$msg .= 'cv8: %%cv8%%'."\n";
121
$msg .= 'cv9: %%cv9%%';
122
123
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_id']), $msg)))
124
if(($msg = preg_replace('/%%parent_txn_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_baid']), $msg)) && ($msg = preg_replace('/%%parent_txn_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_cid']), $msg)))
125
if(($msg = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_number']), $msg)) && ($msg = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_name']), $msg)))
126
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
@@ -156,4 +156,4 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal'))
156
else return apply_filters('c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal', FALSE, get_defined_vars());
157
}
158
}
159
- }
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
70
Since this routine ignores the processing check, it is *possible* that Refund/Reversal Notification URLs will be contacted more than once.
71
If you're writing scripts that depend on Refund/Reversal Notifications, please keep this in mind.
72
*/
73
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['sp_ref_rev_notification_urls'])
74
{
75
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['sp_ref_rev_notification_urls']) as $url)
76
77
+ if(($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $paypal['custom'], true)) && ($url = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_id'])), $url)))
78
if(($url = preg_replace('/%%parent_txn_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_baid'])), $url)) && ($url = preg_replace('/%%parent_txn_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_cid'])), $url)))
79
if(($url = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_number'])), $url)) && ($url = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_name'])), $url)))
80
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
89
90
$paypal['s2member_log'][] = 'Specific Post/Page ~ Refund/Reversal Notification URLs have been processed.';
91
}
92
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['sp_ref_rev_notification_recipients'])
93
{
94
$msg = $sbj = '(s2Member / API Notification Email) - Specific Post/Page ~ Refund/Reversal';
95
$msg .= "\n\n"; // Spacing in the message body.
120
$msg .= 'cv8: %%cv8%%'."\n";
121
$msg .= 'cv9: %%cv9%%';
122
123
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_id']), $msg)))
124
if(($msg = preg_replace('/%%parent_txn_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_baid']), $msg)) && ($msg = preg_replace('/%%parent_txn_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_cid']), $msg)))
125
if(($msg = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_number']), $msg)) && ($msg = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_name']), $msg)))
126
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
156
else return apply_filters('c_ws_plugin__s2member_paypal_notify_in_sp_refund_reversal', FALSE, get_defined_vars());
157
}
158
}
159
+ }
includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -140,7 +140,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
140
$msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_message']; // The same for standard and w/ Pro-Forms.
141
$rec = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_recipients']; // The same for standard and w/ Pro-Forms.
142
143
- if(($rec = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $rec)) && ($rec = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $rec)))
144
if(($rec = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $rec)) && ($rec = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $rec)))
145
if(($rec = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $rec)) && ($rec = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $rec)))
146
if(($rec = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $rec)) && ($rec = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $rec)))
@@ -159,7 +159,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
159
if(($rec = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $rec)))
160
if(($rec = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $rec)))
161
162
- if(($sbj = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $sbj)) && ($sbj = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $sbj)))
163
if(($sbj = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $sbj)) && ($sbj = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $sbj)))
164
if(($sbj = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $sbj)) && ($sbj = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $sbj)))
165
if(($sbj = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $sbj)) && ($sbj = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $sbj)))
@@ -178,7 +178,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
178
if(($sbj = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $sbj)))
179
if(($sbj = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $sbj)))
180
181
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
182
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
183
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
184
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)))
@@ -216,11 +216,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
216
$paypal['s2member_log'][] = 'Modification Confirmation Email sent to: '.$rec.'.';
217
}
218
}
219
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
220
{
221
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_urls']) as $url)
222
223
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
224
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
225
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
226
if(($url = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['initial'])), $url)) && ($url = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['regular'])), $url)) && ($url = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['recurring'])), $url)))
@@ -247,7 +247,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
247
}
248
$paypal['s2member_log'][] = 'Modification Notification URLs have been processed.';
249
}
250
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
251
{
252
$msg = $sbj = '(s2Member / API Notification Email) - Modification';
253
$msg .= "\n\n"; // Spacing in the message body.
@@ -292,7 +292,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
292
$msg .= 'cv8: %%cv8%%'."\n";
293
$msg .= 'cv9: %%cv9%%';
294
295
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
296
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
297
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
298
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)) && ($msg = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $msg)))
@@ -321,9 +321,9 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
321
}
322
$paypal['s2member_log'][] = 'Modification Notification Emails have been processed.';
323
}
324
- if($processing && ($code = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_tracking_codes']) && is_array($cv = preg_split('/\|/', $paypal['custom'])))
325
{
326
- if(($code = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $code)) && ($code = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $code)))
327
if(($code = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $code)) && ($code = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $code)))
328
if(($code = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $code)) && ($code = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $code)))
329
if(($code = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $code)) && ($code = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $code)) && ($code = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $code)))
@@ -376,4 +376,4 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level')
376
else return apply_filters('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level', FALSE, get_defined_vars());
377
}
378
}
379
- }
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
140
$msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_message']; // The same for standard and w/ Pro-Forms.
141
$rec = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_recipients']; // The same for standard and w/ Pro-Forms.
142
143
+ if(($rec = c_ws_plugin__s2member_utils_strings::fill_cvs($rec, $paypal['custom'])) && ($rec = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $rec)))
144
if(($rec = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $rec)) && ($rec = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $rec)))
145
if(($rec = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $rec)) && ($rec = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $rec)))
146
if(($rec = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $rec)) && ($rec = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $rec)))
159
if(($rec = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $rec)))
160
if(($rec = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $rec)))
161
162
+ if(($sbj = c_ws_plugin__s2member_utils_strings::fill_cvs($sbj, $paypal['custom'])) && ($sbj = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $sbj)))
163
if(($sbj = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $sbj)) && ($sbj = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $sbj)))
164
if(($sbj = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $sbj)) && ($sbj = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $sbj)))
165
if(($sbj = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $sbj)) && ($sbj = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $sbj)))
178
if(($sbj = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $sbj)))
179
if(($sbj = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $sbj)))
180
181
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
182
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
183
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
184
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)))
216
$paypal['s2member_log'][] = 'Modification Confirmation Email sent to: '.$rec.'.';
217
}
218
}
219
+ if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_urls'])
220
{
221
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_urls']) as $url)
222
223
+ if(($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $paypal['custom'], true)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
224
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
225
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
226
if(($url = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['initial'])), $url)) && ($url = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['regular'])), $url)) && ($url = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['recurring'])), $url)))
247
}
248
$paypal['s2member_log'][] = 'Modification Notification URLs have been processed.';
249
}
250
+ if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_recipients'])
251
{
252
$msg = $sbj = '(s2Member / API Notification Email) - Modification';
253
$msg .= "\n\n"; // Spacing in the message body.
292
$msg .= 'cv8: %%cv8%%'."\n";
293
$msg .= 'cv9: %%cv9%%';
294
295
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
296
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
297
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
298
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)) && ($msg = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $msg)))
321
}
322
$paypal['s2member_log'][] = 'Modification Notification Emails have been processed.';
323
}
324
+ if($processing && ($code = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_tracking_codes']))
325
{
326
+ if(($code = c_ws_plugin__s2member_utils_strings::fill_cvs($code, $paypal['custom'])) && ($code = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $code)))
327
if(($code = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $code)) && ($code = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $code)))
328
if(($code = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $code)) && ($code = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $code)))
329
if(($code = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $code)) && ($code = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $code)) && ($code = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $code)))
376
else return apply_filters('c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level', FALSE, get_defined_vars());
377
}
378
}
379
+ }
includes/classes/paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -88,11 +88,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
88
}
89
else $paypal["s2member_log"][] = "Ignoring Cancellation. An Auto-EOT Time is already set for this Member. An s2Member API Notification will still be processed however.";
90
91
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_urls"] && is_array($cv = preg_split ("/\|/", $paypal["custom"])))
92
{
93
foreach (preg_split ("/[\r\n\t]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_urls"]) as $url) // Handle Cancellation Notifications.
94
95
- if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["subscr_id"])), $url)))
96
if (($url = preg_replace ("/%%subscr_baid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["subscr_baid"])), $url)) && ($url = preg_replace ("/%%subscr_cid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["subscr_cid"])), $url)))
97
if (($url = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["item_number"])), $url)) && ($url = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["item_name"])), $url)))
98
if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($user->first_name)), $url)) && ($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($user->last_name)), $url)))
@@ -112,7 +112,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
112
}
113
$paypal["s2member_log"][] = "Cancellation Notification URLs have been processed.";
114
}
115
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_recipients"] && is_array($cv = preg_split ("/\|/", $paypal["custom"])))
116
{
117
$msg = $sbj = "(s2Member / API Notification Email) - Cancellation";
118
$msg .= "\n\n"; // Spacing in the message body.
@@ -145,7 +145,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
145
$msg .= "cv8: %%cv8%%\n";
146
$msg .= "cv9: %%cv9%%";
147
148
- if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["subscr_id"]), $msg)))
149
if (($msg = preg_replace ("/%%subscr_baid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["subscr_baid"]), $msg)) && ($msg = preg_replace ("/%%subscr_cid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["subscr_cid"]), $msg)))
150
if (($msg = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["item_number"]), $msg)) && ($msg = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["item_name"]), $msg)))
151
if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($user->first_name), $msg)) && ($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($user->last_name), $msg)))
@@ -187,4 +187,4 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
187
else return apply_filters("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancellation_w_level", false, get_defined_vars ());
188
}
189
}
190
- }
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
88
}
89
else $paypal["s2member_log"][] = "Ignoring Cancellation. An Auto-EOT Time is already set for this Member. An s2Member API Notification will still be processed however.";
90
91
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_urls"])
92
{
93
foreach (preg_split ("/[\r\n\t]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_urls"]) as $url) // Handle Cancellation Notifications.
94
95
+ if (($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $paypal['custom'], true)) && ($url = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["subscr_id"])), $url)))
96
if (($url = preg_replace ("/%%subscr_baid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["subscr_baid"])), $url)) && ($url = preg_replace ("/%%subscr_cid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["subscr_cid"])), $url)))
97
if (($url = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["item_number"])), $url)) && ($url = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($paypal["item_name"])), $url)))
98
if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($user->first_name)), $url)) && ($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs (urlencode ($user->last_name)), $url)))
112
}
113
$paypal["s2member_log"][] = "Cancellation Notification URLs have been processed.";
114
}
115
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_recipients"])
116
{
117
$msg = $sbj = "(s2Member / API Notification Email) - Cancellation";
118
$msg .= "\n\n"; // Spacing in the message body.
145
$msg .= "cv8: %%cv8%%\n";
146
$msg .= "cv9: %%cv9%%";
147
148
+ if (($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace ("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["subscr_id"]), $msg)))
149
if (($msg = preg_replace ("/%%subscr_baid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["subscr_baid"]), $msg)) && ($msg = preg_replace ("/%%subscr_cid%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["subscr_cid"]), $msg)))
150
if (($msg = preg_replace ("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["item_number"]), $msg)) && ($msg = preg_replace ("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($paypal["item_name"]), $msg)))
151
if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($user->first_name), $msg)) && ($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_refs ($user->last_name), $msg)))
187
else return apply_filters("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancellation_w_level", false, get_defined_vars ());
188
}
189
}
190
+ }
includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -153,11 +153,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
153
154
$paypal['s2member_log'][] = 'Member Level/Capabilities demoted to: '.ucwords(preg_replace('/_/', ' ', $demotion_role)).'.';
155
156
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
157
{
158
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls']) as $url) // Handle EOT Notifications.
159
160
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($eot_del_type)), $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
161
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
162
if(($url = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->first_name)), $url)) && ($url = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->last_name)), $url)))
163
if(($url = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode(trim($user->first_name.' '.$user->last_name))), $url)))
@@ -176,7 +176,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
176
}
177
$paypal['s2member_log'][] = 'EOT/Deletion Notification URLs have been processed.';
178
}
179
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
180
{
181
$msg = $sbj = '(s2Member / API Notification Email) - EOT/Deletion';
182
$msg .= "\n\n"; // Spacing in the message body.
@@ -208,7 +208,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
208
$msg .= 'cv8: %%cv8%%'."\n";
209
$msg .= 'cv9: %%cv9%%';
210
211
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($eot_del_type), $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
212
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
213
if(($msg = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->first_name), $msg)) && ($msg = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->last_name), $msg)))
214
if(($msg = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(trim($user->first_name.' '.$user->last_name)), $msg)))
@@ -342,11 +342,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
342
$user_reg_ip = ($user_id) ? get_user_option('s2member_registration_ip', $user_id) : ''; // Needed below.
343
$user_reg_ip = $paypal['ip'] = ($user_reg_ip) ? $user_reg_ip : $paypal['ip']; // Now merge conditionally.
344
345
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['ref_rev_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
346
{
347
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['ref_rev_notification_urls']) as $url)
348
349
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)) && ($url = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_id'])), $url)))
350
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
351
if(($url = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_number'])), $url)) && ($url = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_name'])), $url)))
352
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
@@ -367,7 +367,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
367
}
368
$paypal['s2member_log'][] = 'Refund/Reversal Notification URLs have been processed.';
369
}
370
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['ref_rev_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
371
{
372
$msg = $sbj = '(s2Member / API Notification Email) - Refund/Reversal';
373
$msg .= "\n\n"; // Spacing in the message body.
@@ -404,7 +404,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
404
$msg .= 'cv8: %%cv8%%'."\n";
405
$msg .= 'cv9: %%cv9%%';
406
407
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)) && ($msg = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_id']), $msg)))
408
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
409
if(($msg = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_number']), $msg)) && ($msg = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_name']), $msg)))
410
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
153
154
$paypal['s2member_log'][] = 'Member Level/Capabilities demoted to: '.ucwords(preg_replace('/_/', ' ', $demotion_role)).'.';
155
156
+ if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls'])
157
{
158
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_urls']) as $url) // Handle EOT Notifications.
159
160
+ if(($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $paypal['custom'], true)) && ($url = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($eot_del_type)), $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
161
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
162
if(($url = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->first_name)), $url)) && ($url = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user->last_name)), $url)))
163
if(($url = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode(trim($user->first_name.' '.$user->last_name))), $url)))
176
}
177
$paypal['s2member_log'][] = 'EOT/Deletion Notification URLs have been processed.';
178
}
179
+ if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['eot_del_notification_recipients'])
180
{
181
$msg = $sbj = '(s2Member / API Notification Email) - EOT/Deletion';
182
$msg .= "\n\n"; // Spacing in the message body.
208
$msg .= 'cv8: %%cv8%%'."\n";
209
$msg .= 'cv9: %%cv9%%';
210
211
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%eot_del_type%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($eot_del_type), $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
212
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
213
if(($msg = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->first_name), $msg)) && ($msg = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user->last_name), $msg)))
214
if(($msg = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(trim($user->first_name.' '.$user->last_name)), $msg)))
342
$user_reg_ip = ($user_id) ? get_user_option('s2member_registration_ip', $user_id) : ''; // Needed below.
343
$user_reg_ip = $paypal['ip'] = ($user_reg_ip) ? $user_reg_ip : $paypal['ip']; // Now merge conditionally.
344
345
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['ref_rev_notification_urls'])
346
{
347
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['ref_rev_notification_urls']) as $url)
348
349
+ if(($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $paypal['custom'], true)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)) && ($url = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['parent_txn_id'])), $url)))
350
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
351
if(($url = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_number'])), $url)) && ($url = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['item_name'])), $url)))
352
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
367
}
368
$paypal['s2member_log'][] = 'Refund/Reversal Notification URLs have been processed.';
369
}
370
+ if($GLOBALS['WS_PLUGIN__']['s2member']['o']['ref_rev_notification_recipients'])
371
{
372
$msg = $sbj = '(s2Member / API Notification Email) - Refund/Reversal';
373
$msg .= "\n\n"; // Spacing in the message body.
404
$msg .= 'cv8: %%cv8%%'."\n";
405
$msg .= 'cv9: %%cv9%%';
406
407
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)) && ($msg = preg_replace('/%%parent_txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['parent_txn_id']), $msg)))
408
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
409
if(($msg = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_number']), $msg)) && ($msg = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_name']), $msg)))
410
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
includes/classes/paypal-notify-in-subscr-or-rp-payment-failed-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
includes/classes/paypal-notify-in-subscr-or-rp-payment-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -94,11 +94,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_
94
$user_reg_ip = get_user_option('s2member_registration_ip', $user_id); // Original IP during Registration.
95
$user_reg_ip = $paypal['ip'] = ($user_reg_ip) ? $user_reg_ip : $paypal['ip']; // Now merge conditionally.
96
97
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
98
{
99
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_urls']) as $url)
100
101
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
102
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
103
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
104
if(($url = preg_replace('/%%amount%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['mc_gross'])), $url)) && ($url = preg_replace('/%%txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['txn_id'])), $url)))
@@ -125,7 +125,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_
125
}
126
$paypal['s2member_log'][] = 'Payment Notification URLs have been processed.';
127
}
128
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
129
{
130
$msg = $sbj = '(s2Member / API Notification Email) - Payment';
131
$msg .= "\n\n"; // Spacing in the message body.
@@ -167,7 +167,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_
167
$msg .= 'cv8: %%cv8%%'."\n";
168
$msg .= 'cv9: %%cv9%%';
169
170
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
171
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
172
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
173
if(($msg = preg_replace('/%%amount%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['mc_gross']), $msg)) && ($msg = preg_replace('/%%txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['txn_id']), $msg)))
@@ -230,4 +230,4 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_
230
else return apply_filters('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level', FALSE, get_defined_vars());
231
}
232
}
233
- }
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
94
$user_reg_ip = get_user_option('s2member_registration_ip', $user_id); // Original IP during Registration.
95
$user_reg_ip = $paypal['ip'] = ($user_reg_ip) ? $user_reg_ip : $paypal['ip']; // Now merge conditionally.
96
97
+ if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_urls'])
98
{
99
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_urls']) as $url)
100
101
+ if(($url = c_ws_plugin__s2member_utils_strings::fill_cvs($url, $paypal['custom'], true)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
102
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
103
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
104
if(($url = preg_replace('/%%amount%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['mc_gross'])), $url)) && ($url = preg_replace('/%%txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['txn_id'])), $url)))
125
}
126
$paypal['s2member_log'][] = 'Payment Notification URLs have been processed.';
127
}
128
+ if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_recipients'])
129
{
130
$msg = $sbj = '(s2Member / API Notification Email) - Payment';
131
$msg .= "\n\n"; // Spacing in the message body.
167
$msg .= 'cv8: %%cv8%%'."\n";
168
$msg .= 'cv9: %%cv9%%';
169
170
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
171
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
172
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
173
if(($msg = preg_replace('/%%amount%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['mc_gross']), $msg)) && ($msg = preg_replace('/%%txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['txn_id']), $msg)))
230
else return apply_filters('c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level', FALSE, get_defined_vars());
231
}
232
}
233
+ }
includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -3,7 +3,7 @@
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
@@ -177,7 +177,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
177
$msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_message']; // The same for standard and w/ Pro-Forms.
178
$rec = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_recipients']; // The same for standard and w/ Pro-Forms.
179
180
- if(($rec = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $rec)) && ($rec = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $rec)))
181
if(($rec = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $rec)) && ($rec = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $rec)))
182
if(($rec = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $rec)) && ($rec = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $rec)))
183
if(($rec = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $rec)) && ($rec = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $rec)))
@@ -198,7 +198,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
198
if(($rec = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $rec)))
199
if(($rec = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $rec)))
200
201
- if(($sbj = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $sbj)) && ($sbj = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $sbj)))
202
if(($sbj = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $sbj)) && ($sbj = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $sbj)))
203
if(($sbj = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $sbj)) && ($sbj = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $sbj)))
204
if(($sbj = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $sbj)) && ($sbj = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $sbj)))
@@ -219,7 +219,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
219
if(($sbj = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $sbj)))
220
if(($sbj = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $sbj)))
221
222
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
223
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
224
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
225
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)))
@@ -259,11 +259,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
259
$paypal['s2member_log'][] = 'Modification Confirmation Email sent to: '.$rec.'.';
260
}
261
}
262
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
263
{
264
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_urls']) as $url)
265
266
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
267
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
268
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
269
if(($url = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['initial'])), $url)) && ($url = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['regular'])), $url)) && ($url = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['recurring'])), $url)))
@@ -292,7 +292,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
292
}
293
$paypal['s2member_log'][] = 'Modification Notification URLs have been processed.';
294
}
295
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
296
{
297
$msg = $sbj = '(s2Member / API Notification Email) - Modification';
298
$msg .= "\n\n"; // Spacing in the message body.
@@ -341,7 +341,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
341
$msg .= 'cv8: %%cv8%%'."\n";
342
$msg .= 'cv9: %%cv9%%';
343
344
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
345
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
346
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
347
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)) && ($msg = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $msg)))
@@ -372,9 +372,9 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
372
}
373
$paypal['s2member_log'][] = 'Modification Notification Emails have been processed.';
374
}
375
- if($processing && ($code = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_tracking_codes']) && is_array($cv = preg_split('/\|/', $paypal['custom'])))
376
{
377
- if(($code = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $code)) && ($code = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $code)))
378
if(($code = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $code)) && ($code = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $code)))
379
if(($code = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $code)) && ($code = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $code)))
380
if(($code = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $code)) && ($code = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $code)) && ($code = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $code)))
@@ -428,7 +428,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
428
429
$paypal['s2member_log'][] = 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/o update vars.';
430
431
- if(($registration_url = c_ws_plugin__s2member_register_access::register_link_gen($paypal['subscr_gateway'], $paypal['subscr_id'], $paypal['custom'], $paypal['item_number'])) && is_array($cv = preg_split('/\|/', $paypal['custom'])))
432
{
433
$processing = $during = TRUE; // Yes, we ARE processing this.
434
@@ -436,7 +436,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
436
$msg = preg_replace('/%%registration_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($registration_url), $GLOBALS['WS_PLUGIN__']['s2member']['o'][(($_REQUEST['s2member_paypal_proxy'] && preg_match('/pro-emails/', $_REQUEST['s2member_paypal_proxy_use'])) ? 'pro_' : '').'signup_email_message']);
437
$rec = preg_replace('/%%registration_url%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($registration_url), $GLOBALS['WS_PLUGIN__']['s2member']['o'][(($_REQUEST['s2member_paypal_proxy'] && preg_match('/pro-emails/', $_REQUEST['s2member_paypal_proxy_use'])) ? 'pro_' : '').'signup_email_recipients']);
438
439
- if(($rec = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $rec)) && ($rec = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $rec)))
440
if(($rec = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $rec)) && ($rec = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $rec)))
441
if(($rec = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $rec)) && ($rec = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $rec)))
442
if(($rec = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $rec)) && ($rec = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $rec)))
@@ -450,7 +450,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
450
if(($rec = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['ip']), $rec)))
451
if(($rec = preg_replace('/%%full_coupon_code%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($coupon['full_coupon_code']), $rec)) && ($rec = preg_replace('/%%coupon_code%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($coupon['coupon_code']), $rec)) && ($rec = preg_replace('/%%coupon_affiliate_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($coupon['affiliate_id']), $rec)))
452
453
- if(($sbj = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $sbj)) && ($sbj = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $sbj)))
454
if(($sbj = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $sbj)) && ($sbj = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $sbj)))
455
if(($sbj = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $sbj)) && ($sbj = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $sbj)))
456
if(($sbj = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $sbj)) && ($sbj = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $sbj)))
@@ -464,7 +464,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
464
if(($sbj = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['ip']), $sbj)))
465
if(($sbj = preg_replace('/%%full_coupon_code%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($coupon['full_coupon_code']), $sbj)) && ($sbj = preg_replace('/%%coupon_code%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($coupon['coupon_code']), $sbj)) && ($sbj = preg_replace('/%%coupon_affiliate_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($coupon['affiliate_id']), $sbj)))
466
467
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
468
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
469
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
470
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)))
@@ -490,11 +490,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
490
491
$paypal['s2member_log'][] = 'Signup Confirmation Email sent to: '.$rec.'.';
492
}
493
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['signup_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
494
{
495
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['signup_notification_urls']) as $url)
496
497
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
498
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
499
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
500
if(($url = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['initial'])), $url)) && ($url = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['regular'])), $url)) && ($url = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['recurring'])), $url)))
@@ -511,7 +511,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
511
512
$paypal['s2member_log'][] = 'Signup Notification URLs have been processed.';
513
}
514
- if($processing && $GLOBALS['WS_PLUGIN__']['s2member']['o']['signup_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
515
{
516
$msg = $sbj = '(s2Member / API Notification Email) - Signup';
517
$msg .= "\n\n"; // Spacing in the message body.
@@ -549,7 +549,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
549
$msg .= 'cv8: %%cv8%%'."\n";
550
$msg .= 'cv9: %%cv9%%';
551
552
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
553
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
554
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
555
if(($msg = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $msg)) && ($msg = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $msg)) && ($msg = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $msg)))
@@ -568,9 +568,9 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
568
569
$paypal['s2member_log'][] = 'Signup Notification Emails have been processed.';
570
}
571
- if($processing && ($code = $GLOBALS['WS_PLUGIN__']['s2member']['o']['signup_tracking_codes']) && is_array($cv = preg_split('/\|/', $paypal['custom'])))
572
{
573
- if(($code = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $code)) && ($code = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $code)))
574
if(($code = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $code)) && ($code = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $code)))
575
if(($code = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $code)) && ($code = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $code)))
576
if(($code = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $code)) && ($code = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $code)) && ($code = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $code)))
@@ -598,14 +598,14 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
598
do_action('ws_plugin__s2member_during_paypal_notify_after_subscr_signup_wo_update_vars', get_defined_vars());
599
unset($__refs, $__v);
600
}
601
- if($processing && $_REQUEST['s2member_paypal_proxy'] && ($url = $_REQUEST['s2member_paypal_proxy_return_url']) && is_array($cv = preg_split('/\|/', $paypal['custom']))) // A Proxy is requesting a Return URL?
602
{
603
if((!empty($user_id) && !empty($user) && is_object($user) && $user->ID) || (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with($paypal['subscr_id'], $paypal['option_selection1'])) && is_object($user = new WP_User ($user_id)) && $user->ID))
604
{
605
$fields = get_user_option('s2member_custom_fields', $user_id); // These will be needed in the routines below.
606
$user_reg_ip = get_user_option('s2member_registration_ip', $user_id); // Original IP during Registration.
607
608
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
609
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
610
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
611
if(($url = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['initial'])), $url)) && ($url = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['regular'])), $url)) && ($url = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['recurring'])), $url)))
@@ -663,11 +663,11 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
663
update_user_option($user_id, 's2member_coupon_codes', $user_coupons);
664
$processed_coupons = TRUE; // Flag for routines below.
665
}
666
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_urls'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
667
{
668
foreach(preg_split('/['."\r\n\t".']+/', $GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_urls']) as $url)
669
670
- if(($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) && ($url = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_id'])), $url)))
671
if(($url = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_baid'])), $url)) && ($url = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['subscr_cid'])), $url)))
672
if(($url = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency'])), $url)) && ($url = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['currency_symbol'])), $url)))
673
if(($url = preg_replace('/%%amount%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['mc_gross'])), $url)) && ($url = preg_replace('/%%txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($paypal['txn_id'])), $url)))
@@ -695,7 +695,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
695
}
696
$paypal['s2member_log'][] = 'Payment Notification URLs have been processed.';
697
}
698
- if($GLOBALS['WS_PLUGIN__']['s2member']['o']['payment_notification_recipients'] && is_array($cv = preg_split('/\|/', $paypal['custom'])))
699
{
700
$msg = $sbj = '(s2Member / API Notification Email) - Payment';
701
$msg .= "\n\n"; // Spacing in the message body.
@@ -741,7 +741,7 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
741
$msg .= 'cv8: %%cv8%%'."\n";
742
$msg .= 'cv9: %%cv9%%';
743
744
- if(($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
745
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
746
if(($msg = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $msg)) && ($msg = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $msg)))
747
if(($msg = preg_replace('/%%amount%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['mc_gross']), $msg)) && ($msg = preg_replace('/%%txn_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['txn_id']), $msg)))
@@ -818,4 +818,4 @@ if(!class_exists('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level'))
818
return apply_filters('c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level', FALSE, get_defined_vars());
819
}
820
}
821
- }
3
* s2Member's PayPal IPN handler (inner processing routine).
4
*
5
* Copyright: © 2009-2011
6
+ * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
* (coded in the USA)
8
*
9
* Released under the terms of the GNU General Public License.
177
$msg = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_message']; // The same for standard and w/ Pro-Forms.
178
$rec = $GLOBALS['WS_PLUGIN__']['s2member']['o']['modification_email_recipients']; // The same for standard and w/ Pro-Forms.
179
180
+ if(($rec = c_ws_plugin__s2member_utils_strings::fill_cvs($rec, $paypal['custom'])) && ($rec = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $rec)))
181
if(($rec = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $rec)) && ($rec = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $rec)))
182
if(($rec = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $rec)) && ($rec = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $rec)))
183
if(($rec = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $rec)) && ($rec = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $rec)))
198
if(($rec = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $rec)))
199
if(($rec = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $rec)))
200
201
+ if(($sbj = c_ws_plugin__s2member_utils_strings::fill_cvs($sbj, $paypal['custom'])) && ($sbj = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $sbj)))
202
if(($sbj = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $sbj)) && ($sbj = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $sbj)))
203
if(($sbj = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $sbj)) && ($sbj = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $sbj)))
204
if(($sbj = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $sbj)) && ($sbj = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $sbj)))
219
if(($sbj = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_reg_ip), $sbj)))
220
if(($sbj = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $sbj)))
221
222
+ if(($msg = c_ws_plugin__s2member_utils_strings::fill_cvs($msg, $paypal['custom'])) && ($msg = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $msg)))
223
if(($msg = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $msg)) && ($msg = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $msg)))
224