-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Comments
Reference to suggestion by @daledupreez to add hooks: pbIJXs-34V-p2#comment-5797
|
Might it also be possible to set a custom |
Yes, I think that was your prior suggestion as well? Unless I'm missing something 🤔 |
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. |
Hey, @psealock! Thanks for raising this.
You're right, we can't for the cases you've highlighted.
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.
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. |
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. Another possible use-case later might be to delete sample products in the launch your store task once we have these pieces in place 🤔 |
Sounds good 👍 |
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 onwp_count_posts
, so that automatically added sample products can be excluded from the criteria.The text was updated successfully, but these errors were encountered: