latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Adding php to Capability Tracking Codes

Home Forums Community Forum Adding php to Capability Tracking Codes

This topic contains 4 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 1 month ago.

Topic Author Topic
Posted: Thursday Nov 15th, 2012 at 3:31 pm #31721

I need to add some php to the “Integrate Capability Tracking Codes:” box on the “s2Member® API / Tracking” page .

The wordpress functions aren’t processing from inside the box. Is there a certain way I should be adding the php code other than what’s been tried here?

add_user_meta( '555', 'testing', 'test1' );

<?php add_user_meta( '555', 'testing', 'test2' ); ?>

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Friday Nov 16th, 2012 at 9:07 am #31763
[hilite pre_code]

[/hilite]

That should work, from what I understand.

Any valid XHTML / JavaScript ( or even PHP ) code will work just fine here.

Do you have a user with ID 555?

Posted: Friday Nov 16th, 2012 at 1:52 pm #31791

oh no, lol sorry i changed that from my user_id # to 555 as a security measure while posting here. I went ahead and used the global $user_ID just to be safe, but still nothing added to the database after a successful payment.

so the current code looks like this…

<?php 
global $user_ID;
add_user_meta( $user_ID, 'testing', 'test2' ); 
?>

here’s the s2member shortcode:

[s2Member-PayPal-Button level="*" ccaps="test" desc="my test description" ps="mysite" lc="" cc="USD" dg="0" ns="1" custom="mysite.com" ra="0.01" rp="1" rt="L" rr="BN" image="/images/mypaypalbutton.jpg" output="button" success="http://mysite.com/profile/" /]
Posted: Saturday Nov 17th, 2012 at 2:49 pm #31892

okay i found the issue… checked the paypay-rtn.log and found this:

4 => 'Unable to add new Capabilities. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.',

so problem solved ;D

Posted: Saturday Nov 17th, 2012 at 10:34 pm #31910

That’s great! Thanks for the update. :)

Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.