Support

Home Forums Event Espresso Premium Event Fix Code Previsouly provided no longer works

Event Fix Code Previsouly provided no longer works

Posted: March 2, 2015 at 8:09 pm

Viewing 5 reply threads


d37toastmasters

March 2, 2015 at 8:09 pm

I recently upgraded my EE to verison 3.1.37.0.p and the event espresso code fix to show all question groups regardless of author no longer works. I am seeking a fix so this function can be restored.

Here is the code previously provided:

<?php
/*
Plugin Name: Event Question Fix
Plugin URI:
Description: This Plugin corrects issues for event espresso where a new event editor cannot see all of the questions for events.
Version:
Author:
Author URI:
License:
License URI:
*/
//remove r&P question group filter so any event editor has all the questions:

add_action( ‘init’, ‘ee3_modify_permissions_questions’ );

function ee3_modify_permissions_questions() {
remove_filter(‘espresso_get_question_groups_for_event_where’, ‘espresso_rp_basic_get_question_groups_for_event_where’, 10, 3);
}


Tony

  • Support Staff

March 3, 2015 at 5:00 am

Hi David,

Swap out the code after this comment:

//remove r&P question group filter so any event editor has all the questions:

to use this:

add_filter('espresso_get_question_groups_for_event_where', 'espresso_get_question_groups_for_event_where_custom', 9);
function espresso_get_question_groups_for_event_where_custom() {
 
  remove_filter('espresso_get_question_groups_for_event_where', 'espresso_rp_basic_get_question_groups_for_event_where', 10);
 
  return '';
}

Like this – https://gist.github.com/Pebblo/bb99c190e8d08275f6c0


d37toastmasters

March 3, 2015 at 5:40 am

this causes a fatal error when activating the plugin:

Parse error: syntax error, unexpected ‘<‘ in /nas/wp/www/cluster-1629/d37/wp-content/plugins/event-question-fix/event-question-fix.php on line 14


d37toastmasters

March 3, 2015 at 5:43 am

Nevermind I reread the message actually on the web – its still early – up and working thanks!


Tony

  • Support Staff

March 3, 2015 at 5:45 am

Can you post the full code you are now using please?

You can add it to something like http://pastebin.com/ then post the line to the drop here. Be sure to set the Syntax Highlighting to PHP – http://take.ms/yIn1W

Once you click submit you will be directed to a new page, paste that URL here. It will be something like this: http://pastebin.com/CMTJXgme


Tony

  • Support Staff

March 3, 2015 at 5:46 am

Ah, great 🙂

Glad I could help.

Viewing 5 reply threads

The support post ‘Event Fix Code Previsouly provided no longer works’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso