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.

Plugin order, can't get S2member variables

Home Forums Community Forum Plugin order, can't get S2member variables

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

Topic Author Topic
Posted: Friday Aug 23rd, 2013 at 12:56 am #56528

We have developed a plugin that uses variables set as custom fields in S2Member but it gets a function not found error. We believe it is because out plugin is loading before S2Member. Is there a way to force your plugin to load first?

Thanks
Rob

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Friday Aug 23rd, 2013 at 11:31 am #56551

Just wanted to add this information to see if it helps:

We are trying to use the S2 shortcodes in a plugin while it loads. However, it is returning the following error:
Fatal error: Call to undefined function is_user_logged_in() in /home/fresh/public_html/wp-content/plugins/s2member/includes/classes/sc-gets-in.inc.php on line 64

How can I use the S2 shortcodes in a plug-in when it is being loaded and initialized?
THanks

Posted: Thursday Aug 29th, 2013 at 11:28 pm #58874

It would have to load after s2Member or the s2 functions/shortcodes would not be defined before. If you’re using a hook, [hilite mono]wp_loaded[/hilite] may be a good one to use. http://adambrown.info/p/wp_hooks/hook/wp_loaded

Posted: Friday Aug 30th, 2013 at 11:11 am #58899

Thanks Cristian,
this got us in the right direction and in the end we used this plugin reorder thing to fix the issue:
http://reveloper.com/wordpress-plugins-order-plugin/

this is resolved. Thanks for your help.

Posted: Sunday Sep 1st, 2013 at 7:49 am #58941

Excellent! 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.