Support

Home Forums Event Espresso Premium Conflict with Wp E-Commerce Plugin

Conflict with Wp E-Commerce Plugin

Posted: February 21, 2014 at 8:00 pm


Reza Ali

February 21, 2014 at 8:00 pm

I noticed that all the EE information such as:

– Event Details
– Ticket Options
– Registration
– etc
would disappear from the page when I am logged out of WordPress.

I went through each plugin and identified WP E-Commerce as the ‘incompatible’ plugin. Whenever I deactivate Wp E-Commerce all data comes back.

Reza


Tony

  • Support Staff

February 24, 2014 at 7:22 am

Hi Reza,

Just wanted to post an update, we have reproduced this locally and have a ticket raised for the developers to look into the issue.

I’ve noted to update this thread with any news/fixes.


Reza Ali

February 24, 2014 at 8:19 am

OK. Thanks Tony.


Tony

  • Support Staff

February 26, 2014 at 4:58 am

Hi Reza,

We’ve found an issue with the way WP E-Commerce is handling the main WP_Query that is causing this which has also effected other plugins.

We have a ‘fix’ that should work for the time being if you would like to try?

Just add:

function callback_that_does_nothing( $WP_Query ) {
    return $WP_Query;
}
add_action( 'pre_get_posts', 'callback_that_does_nothing', 8 );

to your themes functions.php file, then load the ‘Events’ page or a single event page to test.


Reza Ali

February 27, 2014 at 4:18 am

Hi Tony.

I notice that the recent update addresses this issue. Do I still need to implement the fix?

Reza


Dean

February 27, 2014 at 4:36 am

Hi Reza,

If the recent update has resolved the issue for you, then you no longer need to apply the fix.


Josh

  • Support Staff

February 27, 2014 at 5:36 am

The recent update doesn’t address the issue. You’ll need to apply the function that Tony outlined above to work around what WP E-commerce does to the main WP Query.


Reza Ali

February 28, 2014 at 9:01 pm

Hi Josh.

I added the fix as suggested and got this error. I think I may have done it wrongly.

[28-Feb-2014 02:37:56 UTC] PHP Parse error: syntax error, unexpected T_RETURN in /home/rezaalin/public_html/wp-content/themes/optimizePressTheme/functions.php on line 22

Reza


Lorenzo Orlando Caum

  • Support Staff

February 28, 2014 at 10:29 pm

Hi Reza,

Could you ensure that the line numbers are not in the function when you copy and paste it?

If you are not sure, please remove the function that you added before and add this one towards the middle of your theme’s functions.php file:

function callback_that_does_nothing( $WP_Query ) {
    return $WP_Query;
}
add_action( 'pre_get_posts', 'callback_that_does_nothing', 8 );

Let me know if this helps.


Lorenzo


Reza Ali

March 1, 2014 at 12:16 am

Hi Lorenzo

Thank you for the lesson. I did as asked and tested. Everything ok now. It’s resolved.

The support post ‘Conflict with Wp E-Commerce Plugin’ 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