Automattic / woocommerce-services

WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes automated tax rates and the ability to purchase and print USPS shipping labels.
GNU General Public License v2.0
107 stars 20 forks source link

Connect Jetpack from shipping label modal #1926

Open c-shultz opened 4 years ago

c-shultz commented 4 years ago

As part of the work to streamline new user onboarding, merchants should be able to connect Jetpack from the shipping modal on the order details screen:

For users with no known Jetpack account, they would get:

image

For users with a known Jetpack account, they can select it:

image

The big picture goal for this functionality is that merchants can install/activate WCS and Jetpack on a button press from WC core (the WC core design/flow is still being worked on though). After WCS and Jetpack are installed, the shipping modal gets launched and allows them to connect Jetpack before they print a label.

Here's a prototype for that flow: https://www.figma.com/proto/okUIuzENoQNGMX1e4ppC8x/Orders%E2%9A%94%EF%B8%8EWCShip?node-id=401%3A59158&viewport=312%2C972%2C0.0625&scaling=contain

c-shultz commented 4 years ago

There's going to be at least a couple hurdles to cross here:

harriswong commented 4 years ago

TODO:

elizaan36 commented 4 years ago

As part of this investigation, and if all of the above is possible :), can we also look at how to tweak the styles and copy in the iframe?

harriswong commented 4 years ago

The client-example from https://github.com/Automattic/client-example can be seen working like this: image

It found me and ask if i want to connect image

image image

If we click "switch account", it will pop up a new window: image

harriswong commented 4 years ago

Before going further, look into whether or not users logged into WordPress.com will see the "approve" flow even if they’ve never connected Jetpack.

harriswong commented 4 years ago

In order to use WCS, the user need to install Jetpack and have it connected to WordPress.com.

By using jetpack-connection, we can have this automated except when the user is not already logged into wordpress.com. In this situation, a Jetpack branded window will popup asking the user to login. We want to prevent this popup. Currently there isn't an easy way to change this behaviour.

Blocked until we find a solution.

c-shultz commented 4 years ago

Thanks for updating here, @harriswong. I'll move this back to the backlog