Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Fatal Error showing when click the finish setup button #8301

Closed mralaminahamed closed 6 months ago

mralaminahamed commented 7 months ago

Describe the bug

An error of a critical nature appears in my WordPress installation when I attempt to finalize the setup by clicking the "Finish Setup" button in the Woo Payments dashboard to complete the configuration.

To Reproduce

Detailed steps to reproduce the issue is facing.

  1. Access the Woo Payments dashboard in your WordPress installation.
  2. Locate and click on the "Finish Setup" button.
  3. After clicking, proceed to scroll down the page.
  4. Observe the fatal error that occurs during the configuration process.

Actual behavior

The desired notice to indicate that it's not allowed in the localhost is not displayed as expected. However, it's crucial that this notice does not adversely affect the site's functionality, and the current behavior seems to be causing a disruption.

Screenshots

Sceenshot: https://drive.google.com/file/d/1ZkHQUk5Rx6UO9KjjqVpGrZkgmIk7N45L/view?usp=sharing Screen record: https://www.loom.com/share/82d0c4f958534677a96d4f75c5e9dd13?sid=b08664dd-f3f9-4033-b680-cb46918de04b

Expected behavior

I expected to see a notice indicating that the operation is not allowed in the localhost environment. This notice should be displayed without causing any disruptions to the site's functionality.

Desktop (please complete the following information):

htdat commented 7 months ago

Thanks for your report @mralaminahamed. The following message is for our internal teams, feel free to ignore it.


This issue impacts "Account life cycle", so assigning to @Automattic/moltres (based on team responsibilities Pc2DNy-3z-p2) cc @anu-rock as team lead.

Assigning as part of Gamma Triage process PcreKM-yM-p2.

csmcneill commented 7 months ago

@mralaminahamed The error is a result of your site being on a private network:

Your site host "woo-payments-at-local.text" is on a private network. Jetpack can only connect to public sites.

WooPayments must be connected to WordPress.com — even in sandbox mode. This means it’s not possible to run WooPayments locally unless you expose your site to the Internet with ngrok or a similar tool.

mralaminahamed commented 7 months ago

@mralaminahamed The error is a result of your site being on a private network:

Your site host "woo-payments-at-local.text" is on a private network. Jetpack can only connect to public sites.

WooPayments must be connected to WordPress.com — even in sandbox mode. This means it’s not possible to run WooPayments locally unless you expose your site to the Internet with ngrok or a similar tool.

I comprehend your point, and I agree that displaying an error message instead of a fatal error would be a more user-friendly approach. I have also made a note of this in the issue description for reference.

Expected behavior I expected to see a notice indicating that the operation is not allowed in the localhost environment. This notice should be displayed without causing any disruptions to the site's functionality.