krumch
Forum Replies Created
-
Not really easy. You must use SQL commands to extract the value of ‘corporate_category’ element in the wp_s2member_custom_fields column, which is saved as serialized array – a string, actually. So use the string functions of SQL to find ‘corporate_category’ index in that string-array, and then to extract it’s value. Assign that value to a SQL variable, like
(some_complex_statement) as my_variable
Then you can use “my_variable” and compare/join it.It’s $current_user->name. Also do
echo print_r($current_user);to see all user’s info and fields. Also good to review WP_User class.If you are inside WP, why not to use this:
global $current_user; $user_id = $current_user->ID;But inside WP the “do_shortcode” function should works, so what plugin you run/create? How it is related to WP/s2M?
Not out-of-the-box way, needs a deep hack… You must keep two PayPals somewhere and force s2M’s options to have the need one, depend of which button must be displayed. And this is s2M->PP communication only, the PP->s2M thread may need more magic…
I am really curious to do, but my suggestion is to use only one PayPal, and to trace payments in the account somehow, maybe by product’s name. Well, this also can be automated, by scrapping, but this is another heavy hack, this time to PayPal…I see two ways:
1. Modify duration in the purchase form, depending of discount
2. modify EOT, depending of discount, after the purchase process is finishedTry this:
echo do_shortcode('[s2Get user_field="user_login" /]');
There also is descriptions and examples how to use API in PHP, look in s2M backend.Stupid, but should works (because so stupid…): build a new translation and change whatever texts you need. Not so good for single text line, but no other way in mind…
Maybe you need a PHP executing plugin?
Is it works before? Is it stops after some activity/upgrade?As “button” I meant all the usual forms and “Buy now” buttons. With Pro forms will be much more difficult, as generator don’t create PHP code… But you can use jQuery to modify the form inside the browser. Or better – find a filter hook after the shorttag is build and before HTML is send and modify the form on the server. Not easy in both cases…
Not “out of the box”, but possible, if “expires” fires some of the “API / Notifications”. Create a function to draft all posts of the user and run it by the API.
Not “out of the box”, but possible by jQuery. Set the comment box to be required in s2M options. Then with jQuery put some default value in it. And show/hide it if users say “yes”. Also clean the default value if “yes”, so user puts his text.
You must create the need Paypal button in the button generator, then use the PHP code it generates to build the form. You can change this code to allow open amount, instead fixed.
Try this (but I am not tested):
function author_s2level(){ return str_replace('-', '', end(get_user_field("s2member_access_cap_times", the_author_meta("id")))); } add_shortcode( 'authorlevel', 'author_s2level' );Should return “levelX”. Also can be “level0” or just “level”.
@watchhimtrade: You not need to worry about CCard info, account numbers etc, all this is the jobs of the payment processors. Your customers don’t even know which payment processor you use. Means, if you use Paypal, you deal with sums only, not with customer’s info (not exactly true, but just for this explanation). If you want Stripe, s2M forms and buttons looks same for customers (but you must create new ones for Stripe in s2M backend), and now Stripe handle CCard info. Nothing else changes, s2M handles the entire checkout process, but for real payment it works directly with the active payment processor.