Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Conversation

@becdetat
Copy link
Contributor

@becdetat becdetat commented Jan 14, 2021

Fixes #5957

This adds a new note that only triggers when updating to WooCommerce Admin 1.9.0.

Screenshots

image

Detailed test instructions:

  1. Go to the WooCommerce home screen. The notification should not be present.
  2. UPDATE wp_options SET option_value = '1.8.0' WHERE option_name = 'woocommerce_admin_version'
  3. In ManageStoreActivityFromHomeScreen.php set the version that is checked (line 41) to 1.9.0-dev (or whatever the version you are using will update to).
  4. Refresh home screen - this will trigger the update. Note should now be present.

/**
* WooCommerce Admin has been installed or updated.
*/
do_action( 'woocommerce_admin_updated' );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The woocommerce_admin_updated action gets triggered on install or update, so I had to add some more specific actions below - woocommerce_admin_updated_existing is what is used in this particular note.

Copy link
Contributor

@psealock psealock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well and code looks good.

So these two actions are new, yeah. What do you think about woocommerce_admin_new_install instead of woocommerce_admin_installed? This would be a fresh install right?

@becdetat
Copy link
Contributor Author

@psealock

So these two actions are new, yeah

Yep

What do you think about woocommerce_admin_new_install instead of woocommerce_admin_installed? This would be a fresh install right?

It would be a fresh install.

I don't love woocommerce_admin_new_install, I prefer a past-tense noun for action names. How about woocommerce_admin_newly_installed?

Copy link
Contributor

@psealock psealock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woocommerce_admin_newly_installed sounds great. And 👍🏽 to keeping the tenses sane

pre-approving

@becdetat becdetat force-pushed the add/manage-store-activity-from-home-screen-note branch from e2241d0 to b6af36f Compare January 15, 2021 01:24
@becdetat becdetat merged commit 155c699 into main Jan 15, 2021
@becdetat becdetat deleted the add/manage-store-activity-from-home-screen-note branch January 15, 2021 01:34
becdetat added a commit that referenced this pull request Jan 15, 2021
* New note: manage activity from home screen

* update readme and fix compared version

* tweak the newly installed action name
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New message: New! Manage your store activity from the Home screen

3 participants