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

Fix: Allow sample products to be excluded from task completion criteria #36195

Open
rjchow opened this issue Dec 27, 2022 · 7 comments
Open

Fix: Allow sample products to be excluded from task completion criteria #36195

rjchow opened this issue Dec 27, 2022 · 7 comments
Labels
focus: setup checklist Issue related to onboarding task list. team: Ghidorah WC Onboarding type: bug The issue is a confirmed bug.

Comments

@rjchow
Copy link
Contributor

rjchow commented Dec 27, 2022

Issue Description:
pbIJXs-34V-p2#comment-5797

There's an issue with the task list completion criteria for the "Add Products" task, as it is currently triggering automatically it is detected that any products have been published. This is triggered when wp_count_posts returns a non-zero number for product posts.

This also triggers when sample products are automatically added and published by themes or plugins etc, without any of the users' involvement.

This would cause inaccurate analytics about how many users are successfully completing store setup as it is one of the criteria for that.

The proposed solution is to add hooks to the has_products() function that would allow adding and removing filters on wp_count_posts, so that automatically added sample products can be excluded from the criteria.

@rjchow rjchow added type: bug The issue is a confirmed bug. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. status: prioritization focus: setup checklist Issue related to onboarding task list. labels Dec 27, 2022
@ilyasfoo
Copy link
Contributor

ilyasfoo commented Dec 28, 2022

Reference to suggestion by @daledupreez to add hooks: pbIJXs-34V-p2#comment-5797

Yes, my thinking was that we could remove any products that we added from our code (based on a post_meta field) and which haven’t been updated by the user.

@daledupreez
Copy link

Might it also be possible to set a custom post_meta flag that indicates a product is a sample product?

@ilyasfoo
Copy link
Contributor

Yes, I think that was your prior suggestion as well? Unless I'm missing something 🤔

@psealock
Copy link
Contributor

Might it also be possible to set a custom post_meta flag that indicates a product is a sample product?

Based on post meta how can we differentiate sample products when plugins we don't control can add products? Meanwhile, merchants can import either sample products or legitimate products. How can we tell the difference?

For the purposes of task completion, does it even matter if the product was imported/auto-added or was legitimately added by the merchant via the UI? I'm not so sure it matters from the merchant perspective.

When there are products and the merchant has not used the UI to add one, we could add a UI element for merchants to indicate if they are sample products or not. But this feels like we're asking the question to suit our interests instead of the merchant, so I hesitate to advocate for this.

@ilyasfoo
Copy link
Contributor

ilyasfoo commented Mar 20, 2024

Hey, @psealock! Thanks for raising this.

Based on post meta how can we differentiate sample products when plugins we don't control can add products? Meanwhile, merchants can import either sample products or legitimate products. How can we tell the difference?

You're right, we can't for the cases you've highlighted.

For the purposes of task completion, does it even matter if the product was imported/auto-added or was legitimately added by the merchant via the UI? I'm not so sure it matters from the merchant perspective.

I believe this issue originated from a concern product task automatically completed in Woo Express straight after site is set up since the default theme (Tsubaki) added sample products. From the merchant's perspective, I think may feel weird since they have not done anything yet.

That has been addressed in Automattic/wc-calypso-bridge#955 for Woo Express/Headstart themes.

When there are products and the merchant has not used the UI to add one, we could add a UI element for merchants to indicate if they are sample products or not. But this feels like we're asking the question to suit our interests instead of the merchant, so I hesitate to advocate for this.

I kind agree with you on this, I think the remaining concern with Woo core is regarding tracks? pbIJXs-34V-p2#comment-5784

cc @SamratBiswas1 do you think we should care if the product task is marked as completed even if the product is added by plugins/themes (excluding Woo Express default theme)? If not, I think we can close this issue.

@adrianduffell adrianduffell removed the priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. label Apr 22, 2024
@adrianduffell
Copy link
Contributor

cc @SamratBiswas1 do you think we should care if the product task is marked as completed even if the product is added by plugins/themes (excluding Woo Express default theme)?

I can probably answer this one. I'd say yes we should care, because merchants won't be able to progress to launching their store with only sample products. I suggest we need to add a first class products property (e.g. is_sample) to allow the exclusion of sample products from the count.

Another possible use-case later might be to delete sample products in the launch your store task once we have these pieces in place 🤔

@ilyasfoo
Copy link
Contributor

I can probably answer this one. I'd say yes we should care, because merchants won't be able to progress to launching their store with only sample products. I suggest we need to add a first class products property (e.g. is_sample) to allow the exclusion of sample products from the count.

Sounds good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: setup checklist Issue related to onboarding task list. team: Ghidorah WC Onboarding type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

6 participants