coinbase / coinbase-woocommerce

DEPRECATED — Accept Bitcoin on your WooCommerce-powered website.
39 stars 27 forks source link

CoinBase for Woocommerce - Fatal Error Line 21 #9

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hello all, I'm new to GitHub but I saw another thread about someone having difficulty with the Coinbase Woocommerce plugin. I just installed the plugin and got the error below.

"Fatal error: Cannot redeclare class Coinbase_Exception in /kratonic.com/wp-content/plugins/coinbase-woocommerce-master/coinbase-php/Coinbase/Exception.php on line 21"

I don't have very strong programming skills so I don't know what the message means. Can anyone help me fix this?

barmstrong commented 10 years ago

@aianus Thoughts?

aianus commented 10 years ago

I just pushed out a big update to the plugin. Can you delete the coinbase-woocommerce-master folder, reinstall, and reopen the issue if you still run into that error?

ghost commented 10 years ago

It resolved the issue with clicking on the settings page within WooCommerce but now after I enter the API Key and Secret Key it gives me the same error.

Although it saves the data after entry, when trying to checkout it will display the same error after clicking to go to Coinbase.

aianus commented 10 years ago

It sounds like you have multiple copies of the coinbase-php folder (or at least the Exception.php file) in your wordpress installation. Try deleting the other copies.

If you're comfortable using the shell on your web server, try

grep -nr 'class Coinbase_Exception' /path/to/your/site

It will show you all the files that declare that class.

ghost commented 10 years ago

I see a bunch of files, all of which are different. The screenshot of the directory is below.

http://imgur.com/izoGLb1

Are any of these files duplicates? They are named very similarly.

Thank you again for your help! You're great!

aianus commented 10 years ago

No, that looks correct. However, you may have multiple copies of that file in different directories within your wordpress installation. The easiest way to find the duplicates would be using the shell command above or some other kind of search utility (search for coinbase-php or Exception.php).

ghost commented 10 years ago

Found out it was because I had the other Coinbase Wordpress Plugin installed and it must have conflicted with it. Thanks again, aianus! Kratonic is now Bitcoin ready :)

aianus commented 10 years ago

Glad to hear it @KratonicKratom