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

Commit

Permalink
Update insight inbox message and add no option (#6555)
Browse files Browse the repository at this point in the history
* Update insight inbox message and add no option

* Add changelog.
  • Loading branch information
moon0326 authored Mar 17, 2021
1 parent 46cbc89 commit 67d13ee
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion TESTING-INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Testing `woocommerce_navigation_intro_modal_dismissed`
1. Enable the new navigation.
2. Shorten your viewport height so that the secondary menu overlaps the main.
3. Make sure the menu title can still be seen.

### Add filter to profile wizard steps #6564

1. Add the following JS to your admin head. You can use a plugin like "Add Admin Javascript" to do this:
Expand All @@ -93,6 +94,11 @@ wp.hooks.addFilter( 'woocommerce_admin_profile_wizard_steps', 'woocommerce-admin
- Upload the plugin and activate it.
- Update the installation date (we need a store between 2 and 5 days old). You can do it with an SQL statement like this:

### Update Insight inbox message #6555

1. Checkout this branch.
2. Update the installation date of your store if it hasn't been at least a day. You can use the following SQL uqery.

```
UPDATE `wp_options` SET `option_value`=UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 5 day)) WHERE `option_name` = 'woocommerce_admin_install_timestamp';
```
Expand Down Expand Up @@ -144,7 +150,10 @@ UPDATE `wp_options` SET `option_value`=UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 7
2. Continue to the Business Details step.
3. Expand "Add recommended business features to my site" by clicking the down arrow.
4. Confirm that "WooCommerce Tax" is listed.
>>>>>>> bbeebaf91 (Add changelog)
3. Install & activate [WP Crontrol](https://wordpress.org/plugins/wp-crontrol/) plugin
4. Navigate to Tools -> Cron Events
5. Run `wc_admin_daily` job
6. Navigate to WooCommerce -> Home and confirm the Insight note.

### Use wc filter to get status tabs for tools category #6525

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Dev: Add filter to profile wizard steps #6564
- Tweak: Adjust targeting store age for the Add First Product note #6554
- Tweak: Improve WC Shipping & Tax logic #6547
- Tweak: Update Insight inbox note content #6555
- Dev: Add nav intro modal tests #6518
- Dev: Use wc filter to get status tabs for tools category #6525
- Tweak: Remove mobile activity panel toggle #6539
Expand Down
11 changes: 10 additions & 1 deletion src/Notes/InsightFirstProductAndPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function get_note() {

$note = new Note();
$note->set_title( __( 'Insight', 'woocommerce-admin' ) );
$note->set_content( __( 'More than 80% of new merchants add the first product and have at least one payment method set up during the first week. We\'re here to help your business succeed! Do you find this type of insight useful?', 'woocommerce-admin' ) );
$note->set_content( __( 'More than 80% of new merchants add the first product and have at least one payment method set up during the first week.<br><br>Do you find this type of insight useful?', 'woocommerce-admin' ) );
$note->set_type( Note::E_WC_ADMIN_NOTE_SURVEY );
$note->set_name( self::NOTE_NAME );
$note->set_content_data( (object) array() );
Expand All @@ -52,6 +52,15 @@ public static function get_note() {
__( 'Thanks for your feedback', 'woocommerce-admin' )
);

$note->add_action(
'affirm-insight-first-product-and-payment',
__( 'No', 'woocommerce-admin' ),
false,
Note::E_WC_ADMIN_NOTE_ACTIONED,
false,
__( 'Thanks for your feedback', 'woocommerce-admin' )
);

return $note;
}
}

0 comments on commit 67d13ee

Please sign in to comment.