Woocommerce-admin: Task List - creating WooCommerce pages without completing the store profiler

Created on 15 Jun 2020  路  14Comments  路  Source: woocommerce/woocommerce-admin

User story:
As a new merchant
I want to be able to create the WooCommerce pages without completing the onboarding
So I can still have the basic pages created as quickly as possible

Description: we're going to streamline the WooCommerce pages creation by automatically creating them, independently if the user completes the onboarding

Acceptance Criteria:

  • [ ] Automatically create the WC pages independently if the user completes the onboarding

Event tracking:
NA

onboarding

Most helpful comment

Sorry for my late response. I've heard some people also mentioned that creating those pages later in the process (not during install) was better when people install plugins and later switch their site to another language, as they would have 'Cart' and 'Shop' instead of 'Cesta' or 'Tienda' pages, but I think that's an edge case.

I agree the pages should be created in core and probably in a better way than tied to onboarding. Created https://github.com/woocommerce/woocommerce/issues/27286 to get it done on our side (and I think this one can be closed? Or maybe not, since some adjustment will be needed in WC Admin as well, I suppose).

All 14 comments

This one feels pretty straightforward to me - calling create_pages() # does most of the heavy lifting for us.

Implementation-wise it also looks like we have some prior REST API endpoints to work with as well - I'm not totally certain on the level of effort to integrate those in with wp.data therefore I'm going to put this a little bit higher on the effort estimate:

Estimate: 3

Good news is that we actually have this endpoint already in place in onboarding:

https://github.com/woocommerce/woocommerce-admin/blob/0b68c1d7c0c5025789071022efa129126da1ded5/src/API/OnboardingTasks.php#L56

Estimate: 2

I agree with an estimate of 2 if there is some test coverage as well. This otherwise feels like a "day or less" task to me.

If there is no input required from the user to create the WooCommerce pages, and they are required to be in place in order to have a functional store, why not just automatically create them when the user skips the store profiler, instead of introducing this new task that doesn't really require anything from the user?

If there is no input required from the user to create the WooCommerce pages, and they are required to be in place in order to have a functional store, why not just automatically create them when the user skips the store profiler, instead of introducing this new task that doesn't really require anything from the user?

That's a good point, it simplifies the implementation and the experience. cc @jameskoster

Yep that makes a lot of sense :D

I'm going to update the issue description to only cover the auto-creation of the Woo pages independently if the user finishes the obw.

Sorry I didn't follow back up on this during the cooldown period.

Going further - why not just have WooCommerce core create the pages as part of it's install routine? Why have this in WC-Admin at all?

The reason we didn't auto-generate the pages in the past was due to concerns that people who had established sites, and were just trying out wc, probably wouldn't want a bunch of pages being published to their site without their say so. This was at a time where pages were generally added to frontend menus automatically upon publish :D

I suppose that is less of a concern now that most people manage their menus manually. But that is a very good point @jeffstieler. It's probably worth discussing this with Proton.

That's a good point.

@peterfabian what do you think about auto-installing the WooCommerce pages after the user activates the plugin? I can open a new issue in the Core repo about this.

Sorry for my late response. I've heard some people also mentioned that creating those pages later in the process (not during install) was better when people install plugins and later switch their site to another language, as they would have 'Cart' and 'Shop' instead of 'Cesta' or 'Tienda' pages, but I think that's an edge case.

I agree the pages should be created in core and probably in a better way than tied to onboarding. Created https://github.com/woocommerce/woocommerce/issues/27286 to get it done on our side (and I think this one can be closed? Or maybe not, since some adjustment will be needed in WC Admin as well, I suppose).

Awesome, thanks @peterfabian.

On the WCA side, we'll need to:

  • Remove the API call that creates store pages in store details unmount.
  • Potentially remove the /create_store_page route from the onboarding API in favor of the methods added in core.
  • Coordinate when this fix gets released with the update in core.

Removing the old onboarding removes the Setup help tab so it will need to be added for onboarding https://github.com/woocommerce/woocommerce/pull/26853

https://github.com/woocommerce/woocommerce/pull/26853 is ready for review. It breaks the core E2E tests due to not redirecting to the setup screen. It will need a PR for this to restore passing E2E tests.

Was this page helpful?
0 / 5 - 0 ratings