-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[3.6] Add setting to control display of Marketplace Suggestions #23218
Conversation
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and it's working well in my testing :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the settings tabs are the appropriate location of these kinds of settings, specifically the accounts tab. All these tabs retains to the functionality of the store and not admin related.
Another thing, settings are manageable by the store manager role whereas suggestions are only presented to users with the capability to install plugins. Same goes for the tracking options that forms part of that settings section.
|
@kloon - given the short-time frame here, can you think of another place where this should live? I like how both tracks and suggestions are toggle-able in the same spot. I feel that is a good ux for store operators. That is a very valid point regarding suggestions only being shown to users whom can install plugins. Should I add some conditional logic to only show this setting to those who would actually see the suggestions? |
4242541
to
e4552c5
Compare
|
@kloon in e4552c5 I updated the logic to only show the setting to users who can install plugins. This has made the diff look a little funky, so maybe just viewing the file is the easiest way to see the changes. I don't think we have time or a place for this and the tracks setting to live outside if where they are shown for now, so I think we need to punt on that aspect of your review until 3.6.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Retested and the setting is working correctly. Also tested with a Shop manager user - setting UI wasn't present - nice :)
|
@kloon & @mikejolley I went ahead and merged this in to unblock @haszari - if either of you want further changes here let me know and I can do another branch, and we can evaluate a better long-term location for these settings post 3.6. |
I think usage tracking is definitely a store-level setting - but concur that marketplace suggestions could very well be a user-level setting. Something worth looking into, but I also fear that if we made it user-level it would be more work for all users of a store to go in and set their preference vs managing store-wide. |
|
@timmyc Then advanced might be the place for both to go but probably fine to punt. |
|
So, currently is Note: I'm not talking about Jetpack, WP Core, or other non-WooCommerce features... ;) |
Hi @jessuppi! Yes, this is the one filter related to suggestions :) There's some more info about other recent changes in this post: https://woocommerce.wordpress.com/2019/04/10/woocommerce-3-6-rc2/ |
All Submissions:
Changes proposed in this Pull Request:
See #23198
This branch adds a new store setting which allows store operators to disable the display of Marketplace Suggestions. By default the setting to display Marketplace Suggestions is turned on/truthy. And as of now the
woocommerce_allow_marketplace_suggestionsfilter can still over-ride this setting to always force suggestions off/on via code if that is desired.This branch also includes a modification to the default/empty suggestions state that adds a link to the new setting to allow users to quickly manage this preference. A follow-up PR will be needed to add similar links to other suggestion states ( /cc @haszari )
How to test the changes in this Pull Request:
/wp-admin/admin.php?page=wc-settings&tab=account, toggle the Marketplace Suggestions setting off ( uncheck ), and save the settings.Other information:
Changelog entry