-
Notifications
You must be signed in to change notification settings - Fork 143
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
Adds Set up Facebook for WooCommerce task #2335
Adds Set up Facebook for WooCommerce task #2335
Conversation
* Removes the admin notice that asked the user to connect to Facebook * Adds a setup task that asks the user to set up facebook
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.
I tested the changes, and they work as expected. Thanks, @ibndawood
I added a small suggestion: running add_setup_task
on admin_init
rather than init
Co-authored-by: Rodrigue <rodrigue.tusse@automattic.com>
Howdy @ibndawood! Thanks for adding this, I looked at this PR as I needed to do something similar for the Google Analytics Integration and found an issue with the hook The hook Also, the class |
Hey @jorgemd24, Thank you for the catch and explanation. I really do appreciate it. It looks like I've missed testing after changing the hook. I'll be more careful next time. Thank you once again. As regards the class name, the namespace conveys the specificity of the class. I think it should be fine here. Your thoughts? |
My only concern is that the class name is used as the index of So that makes it easier for another class with the same name to override the index. Minor thing, the following line can be removed as |
Thank you @jorgemd24 for your input. I can see what you mean. Thank you for the explanation, I appreciate it. Is there a specific reason, why the core would remove the namespace from the I've removed the unused |
@ibndawood I don't know the reason behind this as my point of view is similar to yours, the namespaces would avoid having a duplicate ID in the
Thanks for the further adjustments. I tested and it is now showing the FB task. |
Thank you @jorgemd24 for your feedback and time. I really appreciate it. |
Changes proposed in this Pull Request:
Closes #2298.
This PR:
phpcs
checks? Please removephpcs:ignore
comments in changed files and fix any issues, or delete if not practical.Screenshots:
Detailed test instructions:
wp-admin/admin.php?page=wc-facebook
Additional details:
An earlier version of the PR used
woocommerce_admin_onboarding_task_list
filter and added the task through JS. However, while testing, I found that this approach was deprecated andTaskLists::add_task
is the now recommended method.I searched through all Automattic repos for examples that used the
TaskLists::add_task
method and found this example extension: https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce-admin/docs/examples/extensions/add-task . However, this example extension was not working, so I reached out to @joshuatf who added the example and asked for help.Joshua got back to me and clarified that the task list API had undergone a few changes and explained the reason for the changes. He provided with a working example and created this issue to correct the task example in the documentation. Thank you @joshuatf.
Changelog entry