Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.5.4 function name conflict #1375

Closed
paymentplugins opened this issue Nov 17, 2020 · 2 comments · Fixed by #1387
Closed

Version 4.5.4 function name conflict #1375

paymentplugins opened this issue Nov 17, 2020 · 2 comments · Fixed by #1387
Assignees
Labels
type: bug The issue is a confirmed bug.
Milestone

Comments

@paymentplugins
Copy link

Describe the bug
In version 4.5.4 of this plugin, a new function wc_stripe was added. That function name conflicts with a function of the same name located in the plugin Stripe For WooCommerce

To Reproduce
Steps to reproduce the behavior:

  1. Download and active Stripe For WooCommerce and WooCommerce Stripe Gateway
  2. On the plugin activation page you should see an activation error showing the function name conflict

Expected behavior
N/A

Screenshots
N/A

Environment (please complete the following information):

  • WordPress Version 5.5.3
  • WooCommerce Version 4.7.0
  • Stripe Plugin Version 4.5.4+
  • Any other plugins installed: Stripe For WooCommerce

Additional context
If possible, please rename your wc_stripe function to something that does not conflict. I am also looking in to changing my function name but it has been in use since the plugin's creation and so there is a high likely hood that developers have referenced the wc_stripe function in their custom development.

Kind Regards,

@paymentplugins
Copy link
Author

Hi Team,

There are quite a few reports of this issue now in the Wordpress.org support threads. I am planning a release today so I'll be updating the function wc_stripe to stripe_wc within my plugin. Please do not use the function name stripe_wc in future releases of your plugin.

There will still be references to the wc_stripe function out in the wild where developers have added custom code to integrate. For that reason I am adding a check where the wc_stripe function will be loaded if your plugin is not active. That means it's still a good idea if you rename your function to something else.

Kind Regards,

@katinthehatsite
Copy link

I have another customer that I was working with and they got the same issue as reported: https://wordpress.org/support/topic/installation-breaks-website/ however, they did not have Stripe for WooCommerce from paymentplugins installed. The exact error that happens upon activating Stripe:

Uncaught Error: Call to a member function get_base_city() on null in

/public/wp-content/plugins/woocommerce-gateway-stripe/includes/connect/class-wc-stripe-connect-api.php:209 Stack trace: #0
/public/wp-content/plugins/woocommerce-gateway-stripe/includes/connect/class-wc-stripe-connect-api.php(99): WC_Stripe_Connect_API->request_body(Array) #1
/public/wp-content/plugins/woocommerce-gateway-stripe/includes/connect/class-wc-stripe-connect-api.php(58): WC_Stripe_Connect_API->request('POST', '/stripe/oauth-i...', Array) #2
/public/wp-content/plugins/woocommerce-gateway-stripe/includes/connect/class-wc-stripe-connect.php(50): WC_Stripe_Connect_API->get_stripe_oauth_init('https://lockitu...') #3
/public/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/stripe-settings.php(23): WC_Stripe_Connect->get_oauth_url() #4 /sr
/public/wp-content/plugins/woocommerce-gateway-stripe/includes/connect/class-wc-stripe-connect-api.php on line 209

@katinthehatsite katinthehatsite added the type: bug The issue is a confirmed bug. label Nov 18, 2020
@v18 v18 added this to the Sprint 22 milestone Nov 27, 2020
@allendav allendav self-assigned this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants