krumch
Forum Replies Created
-
Sorry, my fault, misunderstood you before. For PTD vars I would read the code directly, there can stay some hook, allowing to read them.
Another way may be to try payment notifications, info can be there already.Sorry, I have no examples. Not need to care about Paypal PTDs, s2M cares for that. You just use these attributes. Read s2M’s manual carefully…
My plugin KC s2M+MC can do your job. It allows you to check by PHP function or by s2M condition like this:
[s2IF kcs2mmc_subscribed_to(listID)] download link as usual content here [/s2IF]Link will be seen only for those who is subscribed. Needs Pro version for that.
Those attributes I mentioned go to Paypal and returns back to your site, by different ways. They are exactly what you need. Well, at least I would do it such way…
I can think about two possibilities: “ccaps” and “custom” attributes. They works different, please read description at “s2Member -> PayPal Button -> Shortcode attributes (Explained)”.
I would tie a function to “profile_update” and “user_register” hooks, so it runs just after the change. Works if admin changes info too.
Thanks! That’s better solution than mine – logical and understandable for the user.
Possible can load restricted page in a <iframe>, and this iframe to be shown to allowed users only?
OK, I would attach a function to this hook, to check if member is allowed to register. If none, will do wp_redirect(home_url())…
I am curious to see your solution, if possible…Please give a bit more info: What if a member is not in the province it supposed to be for this level? Goes to another level? Or blocked (not registered)?
Got you. There is another way: When users renew with discount, save a ccap to them (“stamp” his account…). Then if they try to renew again, check for that ccap. If none – allow discount. If exists – no discount. This is just s2M conditions at renew page.
You are welcome 🙂 Note that you fix my 1) above. There is no reason to include any code to find current user’s info in a plugin. If we have same definition about “plugin”…
You not need to modify core files when you build a plugin… And not need to “include” or “require” any WP library too, as plugin works “inside” WP, after WP is fully loaded… So you have some big capital errors. I can see two: 1) your file have a hard coded path in your “include” row, which is bad for portability; 2) you not need to include that file, WP will include it. RTFM…
How a member can buy two different products, means two “subscriptions”, by your description, and to be in two levels, in same time?
No, SQL have no command to unserialize an array, and no “array” value type there. You must handle it as a string, using string commands. There will be several of them, included in each other. All this will be “some_complex_statement” I show above. You should see how the array is saved in DB (my “KC Tools” plugin is good for this) so you can find the string ‘”corporate_category”‘ inside, and then to find it’s value. Value is saved after (next to) the index, needs more string commands to recognize and extract it. Yeah, not easy…