Support » Plugin: Subscribe2 » [Plugin: Subscribe2] Call to s2class::user_menu() terminates prematurely

  • Hi,

    I wanted to move the settings-page from the wp-admin area to a separate page (because users on my site should not be allowed to access wp-admin).

    I found in another thread that you suggested to call s2class::user_menu() within a page.

    I tried that but the execution terminates because this error occurs:

    Call to undefined method WPShortcodeExecPHP::get_usermeta_keyname() in /wp-content/plugins/subscribe2/subscribe2.php on line 2548

    I have added a shortcode within the plugin “WP Shortcode Exec PHP” which just calls “s2class:user_menu()”.

    Do I need to import other php-files? How to resolve this?

    It would be great if Subscribe2 would have such a shortcode that the form for changing user settings could be included anywhere!

Viewing 3 replies - 1 through 3 (of 3 total)
  • @aschne,

    You need to be able to access the entire class rather than just the one function.

    Try making the class a global and then calling the user_menu(), something like this perhaps:

    global $mysubscribe2;

    Thanks for the quick feedback.

    Instead of using a global var I instantiated the class again and now it seems to work (but still mangles my layout, need to look into this later).

    I now call it like this:

    $mysubscribe2 = new s2class;

    Thank you for the code!

    global $mysubscribe2;

    I have been looking so long for this to move the notification settings back end options to the front end.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Subscribe2] Call to s2class::user_menu() terminates prematurely’ is closed to new replies.