Event Espresso Conflicting with Jigoshop

Event Espresso Conflicting With Jigoshop

I have recently run into a problem with a WordPress site. The problem was the PayPal payment portal button would not show and all that came up was an error like this:

Fatal error: Cannot redeclare class PaymentGateway in /

Read more: Cannot redeclare class fatal error

This problem is being caused by a conflict between the 2 plugins supporting PayPal. I did seem to find a solution though.

In the plugin folder /wp-content/plugins/event-espresso.3.1.12.P/gateways/paypal/

You will see 5 or 6 files. The important ones are these:
paypal_vars.php
paypal_ipn.php
Paypal.php

Go through these files and rename all Paypal values to another name. The best way is to open something like textpad and do a search for Paypal and replace with new class.
Make sure not to change any of the $paypal_settings or $myPaypal names though.

Be sure to back up all 3 of these files before editing or trying anything. If all else fails contact EventEspresso for support or you can hire me to help you.

Either way good luck and hope this helps.

Thanks to Bill Chambers for help with this

4 Comments

  • Chris says:

    Excellent post. You’re the only one on the net with an actual solution that doesn’t involve paying for custom coding from Espresso Events. I received the “Fatal Error: Cannot redeclare class Paypal” for Paypal.php. I traced it to a conflict with Jigoshop Paypal Gateway, Paypal.php and found no solution except yours. To clarify a little for others, I have included the exact code changes to Espresso Events files below. Thank you again!!!

    File: wp-contentpluginsevent-espresso.3.1.13.PgatewayspaypalPaypal.php

    Changed Line 12: class Paypal extends PaymentGateway {

    To: class Paypal1 extends PaymentGateway {

    File: wp-contentpluginsevent-espresso.3.1.13.Pgatewayspaypalpaypal_vars.php

    Changed Line 7: $myPaypal = new Paypal();

    To: $myPaypal = new Paypal1();

    File: wp-contentpluginsevent-espresso.3.1.13.Pgatewayspaypalpaypal_ipn.php

    Changed Line 10: $myPaypal = new Paypal();

    To: $myPaypal = new Paypal1();

  • Q says:

    Thanks for this great piece of help. How many values are there that need changing because a lot of them are actually $paypal_settings or $myPaypal ?

Leave a Reply to Q Cancel Reply