CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 163 forks source link

When Braintree for Caldera is active with WooCommerce Braintree Payment Gateway and error is displayed. #2681

Closed DeanBu closed 6 years ago

DeanBu commented 6 years ago

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

The issue is when all three of the following plugins are active: Caldera Forms, Braintree for Caldera & WooCommerce Braintree Payment Gateway

What Is The Unexpected Behaviour?

When all three plugins are active (Caldera Forms, Braintree for Caldera & WooCommerce Braintree Payment Gateway) an error is displayed:

[18-Jul-2018 17:54:38 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [18-Jul-2018 17:54:38 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [18-Jul-2018 17:54:38 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [18-Jul-2018 17:54:38 UTC] PHP Warning: Cannot declare class Braintree_TransactionGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/TransactionGateway.php on line 531 [18-Jul-2018 17:54:38 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [18-Jul-2018 17:54:38 UTC] PHP Fatal error: Cannot declare class Braintree_Base, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/braintree-for-caldera-forms/vendor/braintree/braintree_php/lib/Braintree/Base.php on line 6

debug.log

When the Caldera Braintree extension is disabled, the WooCommerce/Braintree connection works fine again.

DeanBu commented 6 years ago

https://secure.helpscout.net/conversation/623391672/11276/?folderId=2136818

Shelob9 commented 6 years ago

@deanbu what version of the BrainTree add-on is this? I fixed a simliar conflict with SkyVerge's WooCommerce + Braintree add on last year-ish.

If they are not on the latest version, that might be the issue. If not, can you please ask for a copy of the other add-on for me to test with?

On Mon, Jul 23, 2018, 11:03 AM DeanBu notifications@github.com wrote:

https://secure.helpscout.net/conversation/623391672/11276/?folderId=2136818

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CalderaWP/Caldera-Forms/issues/2681#issuecomment-407089927, or mute the thread https://github.com/notifications/unsubscribe-auth/AB5uRzgKlfK2FdtJpKwA_U9VWqBQgELeks5uJeXcgaJpZM4VbKUm .

DeanBu commented 6 years ago

On it, @Shelob9 !

javelindesign commented 6 years ago

Hi Shelbo9/Dean,

I've zipped the plugin and uploaded to:

http://wissskating.com/wc-braintree.zip

Good luck and thanks!

javelindesign commented 6 years ago

wc-braintree.zip

I tried to upload here too.. Thanks!

javelindesign commented 6 years ago

Hi @Shelob9 - Just checking to see if there has been any progress on this.... I'd love to use Caldera with WooCommerce, but the Braintree for both need to play nicely together! Thanks!

Jay

Shelob9 commented 6 years ago

@javelindesign Sorry we had a communication break down here. Dean should be following up in support with help using the cf_brain_tree_load_dependencies filter to resolve this issue.

https://calderaforms.com/doc/cf_brain_tree_load_dependencies/

javelindesign commented 6 years ago

Dear @DeanBu and @Shelob9

Thanks for the little plugin that fixes that issue, but it still seems to be a problem.. I reactivate the Caldera Braintree plugin as well as the newly made "caldera-forms-woocommerce-braintree-fix" plugin (attached) then went in to WooCommerce to order a $1 test product I have setup. Still got the same generic "server error" alert when trying the final stage of checkout. Disabling both these plugins again allowed the transaction to proceed.

In looking at the wordpress debug.log file, I see:


[01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_ClientTokenGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/ClientTokenGateway.php on line 129 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_ClientToken, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/ClientToken.php on line 49 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Util, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Util.php on line 422 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Xml, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml.php on line 39 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Xml_Generator, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml/Generator.php on line 149 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Version, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Version.php on line 34 [01-Aug-2018 15:23:27 UTC] PHP Warning: Cannot declare class Braintree_Xml_Parser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml/Parser.php on line 140 [01-Aug-2018 15:23:58 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [01-Aug-2018 15:23:58 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [01-Aug-2018 15:23:58 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [01-Aug-2018 15:23:58 UTC] PHP Warning: Cannot declare class Braintree_TransactionGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/TransactionGateway.php on line 531 [01-Aug-2018 15:23:58 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [01-Aug-2018 15:23:58 UTC] PHP Fatal error: Cannot declare class Braintree_Base, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/braintree-for-caldera-forms/vendor/braintree/braintree_php/lib/Braintree/Base.php on line 6


Please let me know what to do.. I'm sorry I'm not super technical, but can probably dig up any additional info you need.

Best,

Jay

caldera-forms-woocommerce-braintree-fix.zip

javelindesign commented 6 years ago

Also, I tried to put that in my theme's functions.php file (instead of using the plugin) - same problem there... Still looks like there is a conflict:


[01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_ClientTokenGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/ClientTokenGateway.php on line 129 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_ClientToken, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/ClientToken.php on line 49 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Util, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Util.php on line 422 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Xml, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml.php on line 39 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Xml_Generator, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml/Generator.php on line 149 [01-Aug-2018 16:03:50 UTC] PHP Warning: Cannot declare class Braintree_Version, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Version.php on line 34 [01-Aug-2018 16:03:51 UTC] PHP Warning: Cannot declare class Braintree_Xml_Parser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml/Parser.php on line 140 [01-Aug-2018 16:04:18 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [01-Aug-2018 16:04:18 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [01-Aug-2018 16:04:18 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [01-Aug-2018 16:04:18 UTC] PHP Warning: Cannot declare class Braintree_TransactionGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/TransactionGateway.php on line 531 [01-Aug-2018 16:04:18 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [01-Aug-2018 16:04:18 UTC] PHP Fatal error: Cannot declare class Braintree_Base, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/braintree-for-caldera-forms/vendor/braintree/braintree_php/lib/Braintree/Base.php on line 6 [01-Aug-2018 16:04:39 UTC] PHP Notice: Undefined offset: 0 in /home/wissskating/public_html/wp-content/themes/Avada/includes/class-avada-widget-style.php on line 277 [01-Aug-2018 16:04:39 UTC] PHP Notice: Trying to get property of non-object in /home/wissskating/public_html/wp-content/themes/Avada/includes/class-avada-widget-style.php on line 360


javelindesign commented 6 years ago

@DeanBu and @Shelob9,

Hi guys.. just checking to see if I can provide any further information or if you had any other ideas on why the Caldera Braintree plugin is still not working with WooCommerce Braintree... Thanks! Jay

Shelob9 commented 6 years ago

Jay - We'd be happy to help through our support system. Please reply to your open ticket or open a new one and Dean or I will reply there.

On Wed, Aug 8, 2018, 10:30 AM Jay Valinis notifications@github.com wrote:

@DeanBu https://github.com/DeanBu and @Shelob9 https://github.com/Shelob9,

Hi guys.. just checking to see if I can provide any further information or if you had any other ideas on why the Caldera Braintree plugin is still not working with WooCommerce Braintree... Thanks! Jay

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CalderaWP/Caldera-Forms/issues/2681#issuecomment-411426383, or mute the thread https://github.com/notifications/unsubscribe-auth/AB5uRzF3E_aZ_uTnFTopwyQiUQANoiQ-ks5uOvX5gaJpZM4VbKUm .

javelindesign commented 6 years ago

@DeanBu and @Shelob9

Hi guys, I reopened the ticket through the Caldera site (I think).. still getting the same generic error when the Braintree payments for Caldera plugin is activated.. even with the "fix" plugin. Still getting the same/similar errors in the WordPress debug.log file...


[16-Aug-2018 19:36:34 UTC] PHP Notice: Undefined offset: 0 in /home/wissskating/public_html/wp-content/themes/Avada/includes/class-avada-widget-style.php on line 277 [16-Aug-2018 19:36:34 UTC] PHP Notice: Trying to get property of non-object in /home/wissskating/public_html/wp-content/themes/Avada/includes/class-avada-widget-style.php on line 360 [16-Aug-2018 19:37:19 UTC] PHP Notice: Trying to get property of non-object in /home/wissskating/public_html/wp-content/plugins/revslider/includes/page-template.class.php on line 115 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_ClientTokenGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/ClientTokenGateway.php on line 129 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_ClientToken, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/ClientToken.php on line 49 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Util, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Util.php on line 422 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Xml, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml.php on line 39 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Xml_Generator, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml/Generator.php on line 149 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Version, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Version.php on line 34 [16-Aug-2018 19:38:18 UTC] PHP Warning: Cannot declare class Braintree_Xml_Parser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Xml/Parser.php on line 140 [16-Aug-2018 19:38:54 UTC] PHP Warning: Cannot declare class Braintree_Gateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Gateway.php on line 251 [16-Aug-2018 19:38:54 UTC] PHP Warning: Cannot declare class Braintree_Configuration, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Configuration.php on line 602 [16-Aug-2018 19:38:54 UTC] PHP Warning: Cannot declare class Braintree_CredentialsParser, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/CredentialsParser.php on line 147 [16-Aug-2018 19:38:54 UTC] PHP Warning: Cannot declare class Braintree_TransactionGateway, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/TransactionGateway.php on line 531 [16-Aug-2018 19:38:54 UTC] PHP Warning: Cannot declare class Braintree_Http, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/Braintree/Http.php on line 263 [16-Aug-2018 19:38:54 UTC] PHP Fatal error: Cannot declare class Braintree_Base, because the name is already in use in /home/wissskating/public_html/wp-content/plugins/braintree-for-caldera-forms/vendor/braintree/braintree_php/lib/Braintree/Base.php on line 6


Please advise.. I really need to get Braintree payments working with Caldera and WooCommerce! Thanks,

Jay

debug.log

Shelob9 commented 6 years ago

@javelindesign Can I ask you to please use our support system? This is what we use for organizing Caldera Forms development.

https://calderaforms.com/support

javelindesign commented 6 years ago

Will do Josh.. sorry I was a bit confused as I didn’t see the previous thread there. Will follow up there in the future.

J

--

Jay Valinis Javelin Design 8523 Germantown Avenue Rear Building Philadelphia, PA 19118 Phone: 215-248-5665 Fax: 215-248-3921 E-mail: info@javelindesign.com mailto:info@javelindesign.com Web: http://www.javelindesign.com http://www.javelindesign.com/

PGP Public Key available at hkp://keys.gnupg.net

On Aug 16, 2018, at 4:26 PM, Josh Pollock notifications@github.com wrote:

@javelindesign https://github.com/javelindesign Can I ask you to please use our support system? This is what we use for organizing Caldera Forms development.

https://calderaforms.com/support https://calderaforms.com/support — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CalderaWP/Caldera-Forms/issues/2681#issuecomment-413673969, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ5RsgixWD_pnSM_banzz7T6BeDJYltQks5uRdWRgaJpZM4VbKUm.