**Confirm the default behaviour remains the same**
1. Create a new store and install the [WP Mail Logging by MailPoet plugin](https://wordpress.org/plugins/wp-mail-logging/)
2. Go to Analytics -> Revenue and change the date range to last month
3. Click the download button and make sure you see the "Your revenue report will be emailed to you" notification
4. Go to Tools -> Scheduled Action and run the newly created `woocommerce_admin_report_export` action. After that is complete, run the `woocommerce_admin_email_report_download_link` action.
5. Go to Tools -> WP Mail Log and check the latest email. The URL linked to the "Download your Revenue report" should work as usual. The URL will be something like `filename=wc-revenue-report-export-16236128226138`
**Confirm the new filter is working**
1. Add this code to the `woocommerce-admin.php` file
```php
add_filter( 'woocommerce_admin_export_id', function ($export_id) {
return 'different_export_id';
} );
```
2. Repeat the same steps from above. The filename in the link now should be `different_export_id`.
1. Navigate to the homescreen via WooCommerce -> Home
2. Click on "Set up payments"
#### How to test
Individual payment gateway plugins dictate the settings and connection flow. For testing purposes, we'll test both the default behavior of the gateway and the enhanced configuration behavior.
1. On the payments task, click "Set up" or "Enable" next to a gateway
2. Note that the gateway is installed if it requires a plugin
3. On the connection step, a button should be presented that links to the gateway's (legacy) settings screen
5. Install some of the payment gateways from the links below. They don't need to be activated, but the folder names should match those on WordPress.org to avoid conflicts.
6. If setting fields are shown, make sure that validation works, input is saved, and is persisted on page refresh. Make sure the gateway is marked as enabled and not labeled "Requires setup" if all fields are completed.
7. If the "Connect" button is shown, follow the connection flow. Make sure that you are returned to the payments task and that the gateway is enabled and marked as configured.
8. Remove some settings manually under the payment gateway's legacy settings screen. Make sure the gateway is no longer marked as configured.
1. Set your country to South Africa in WooCommerce->Settings
2. Don't select CBD as an industry during onboarding
##### Paystack
1. Set your country to South Africa in WooCommerce->Settings
2. Don't select CBD as an industry during onboarding
3. Complete the payment tasks
4. Make sure that `ZAR` is the site currency after configuration of Paystack and that "test mode" is turned off in settings
##### Stripe
1. Set your store country to a Stripe supported country (e.g., US - https://stripe.com/global )
2. Don't select CBD as an industry during onboarding
3. Make sure you're using a site with https
4. Attempt to use the oauth connection flow to enable the gateway, making sure you are returned to the site and connection is successful
5. Remove the connection and use a non-https site
6. Check that the manual settings configuration flow is shown
##### PayPal
1. Set your store country to any country except India
2. Don't select CBD as an industry during onboarding
3. Make sure the PayPal connection flow is shown and works as expected
4. In Chrome, open the console "Network" tab and right-click on the `get-params` request and select "Block request URL"
5. Refresh the page and note that the manual settings flow is shown
##### Klarna
1. Set your store country to one of the following: `SE, FI, NO`
2. Don't select CBD as an industry during onboarding
##### Mollie
1. Set your store country to one of the following: `FR, DE, GB, AT, CH, ES, IT, PL, FI, NL, BE`
2. Don't select CBD as an industry during onboarding
##### Mercado Pago
1. Set your store country to one of the following: `AR, BR, CL, CO, MX, PE, UY`
2. Make sure the help text is shown when setting up the gateway with links to registration and the settings screen.
### WooCommerce Payments
1. Set your store country to one of the following: `US, PR`
2. Don't select CBD as an industry during onboarding
3. Make sure the WC Pay card is shown above the other payment gateways
4. Attempt to install and configured the gateway
##### Cash on Delivery
1. Make sure "Enable" is shown and clicking this enables the gateway
2. Make sure the "Manage" button is shown after enabling the gateway
##### Direct bank transfer
1. Make sure "Set up" is shown next to the gateway
2. Enter some bank details
3. Make sure the gateway is marked as enabled and configured with the entered settings when visiting the legacy settings screen
##### RazorPay
1. Set your store country to India
2. Don't select CBD as an industry during onboarding
##### eWAY
1. Set your store country to one of the following: `AU, NZ`
2. Don't select CBD as an industry during onboarding
3. Make sure the API key and password fields are shown
##### Square
1. Set your store country to the `US` and select CBD as an industy during onboarding OR set your store country to one of `US, CA, JP, GB, AU, IE`, don't select CBD as an industry and select that you have a physical store in the business details step.
### Add plugin installer to allow installation of plugins via URL #6805
1. Visit any admin page with the params `plugin_action` (`install`, `activate`, or `install-activate`) and `plugins` (list of comma separated plugins). `wp-admin/admin.php?page=wc-admin&plugin_action=install&plugins=jetpack`
2. If visiting this URL from a link, make sure you are sent back to the referer.
3. Check that the plugins provided are installed, activated, or both depending on your query.
### Add event recording to start of gateway connections #6801
- Enable debug messages inside browser devtools, you can do it by running `localStorage.setItem( 'debug', 'wc-admin:*' );` in your browser console. And don't forget to enable all log levels.
- Create a new store with event tracking enabled.
- Select `United States` or `UK` as the store country.
- Visit the Payments task and click to setup `Stripe` and `PayPal`.
- Verify the event `wcadmin_payments_task_stepper_view` with the right `payment_method was recorded correctly.
- Press `Proceed` and verify the event `wcadmin_tasklist_payment_connect_start` with the right `payment_method` was recorded.
- Verify that the event `wcadmin_tasklist_payment_connect_start` also is recorded for the payment gateways: Square, eWAY (for AU and NZ) and generic gateways like PayFast (for ZA) and PayStack (for ZA, GH, and NG).
### Add recommended payment methods in payment settings. #6760
- Create a new store and finish the onboarding flow, making sure your store location is filled out and within US | PR | AU | CA | GB | IE | NZ
- Visit **Woocommerce > Settings > Payments** you might have to wait a couple seconds, but it should show a card with **Recommended ways to get paid** listing 3 different payment providers (WC Payments, Stripe, and Paypal).
- Click `Get started` on one of the providers, it will show a loading icon (installing the plugin), once done it should redirect you to the plugin set up page.
- Check if the plugin is installed and activated.
- Go back to the payment settings page
- Notice how the plugin you had previously installed and activated does not display anymore.
- Go to **WooCommerce > Settings > Advanced > WooCommerce.com** and un-select **Show Suggestions** and save
- Go to the payments setting screen again, the card should not be displayed.
- Enable the **Show Suggestions** again in **WooCommerce > Settings > Advanced > WooCommerce.com**
- Go to the payments setting screen again, the card should be displayed.
- Click on the 3 dots of the card, click `Hide this`, it should make the card disappear, it should also not show on refresh.
This can't be shown again unless the `woocommerce_show_marketplace_suggestions` option is deleted (through PHPMyAdmin or using `wp option delete woocommerce_show_marketplace_suggestions`).
4. Navigate to various analytics reports and note the time filter is based on the current store time. E.g., If your store timezone is 12 hours ahead of your current time, you may see `1st - 23rd` instead of `1st - 22nd` for "Month to date" depending on your time of day.
4. Choose 'Single product' from the 'Show' dropdown and search for the product.
5. Confirm that the "Variations" table shows the correct variations. If you searched for the 'Product A', then you should see color:black and color:white.
In case the report shows "no data", please reimport historical data by following the guide on [here](https://docs.woocommerce.com/document/woocommerce-analytics/#analytics-settings__import-historical-data)
- Now go to WooCommerce > Settings > Email (`/wp-admin/admin.php?page=wc-settings&tab=email`) and check the checkbox `Enable email insights` and save changes.
- Go to Tools > WP Mail Logging Log (`/wp-admin/tools.php?page=wpml_plugin_log`) and verify the testing email note was sent.
- View the message and press `Test action` (a broken image will be visible under the button, but that's expected and only visible in a test environment).
### Set default value to array when op is `contains` #6622
1. Clone and start https://github.com/Automattic/woocommerce.com
2. Open `notifications.json.php` from woocommerce.com repository and find a rule that uses the `contains` operator and remove the `default` key. Please make a note of the option name.
3. Open `src/RemoteInboxNotifications/DataSourcepoller.php` from your WooCommerce Admin repository and change the datasource to your local woocommerce.com (woocommerce.test)
4. Make sure your local WooCommerce Admin database does not have the option from step #2
1. Open your browser console and enter `localStorage.setItem( 'debug', 'wc-admin:tracks' );`. Make sure the "Verbose" is selected under the levels shown.
2. Navigate to WooCommerce -> Settings -> Advanced -> features (/wp-admin/admin.php?page=wc-settings&tab=advanced§ion=features) and enable Navigation
3. Open browser inspector and select the Network tab.
4. Navigate to WooCommerce -> Home
5. Confirm that the request to `/wp-json/wc-admin/options?options=woocommerce_navigation_intro_modal_dismissed&_locale=user` returns 200 status.
1. Get an IE 11 test environment. I downloaded a trial version of Parallels Desktop on [here](https://www.parallels.com/) and IE 11 virtual machine from [developer.microsoft.com](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/)
2. Make a zip version of this branch by running `npm run test:zip`
3. Make a JN site -> install and activate the zip file.
4. Open IE 11 and start OBW
5. Confirm that the themes are displayed correctly.
- Verify that the Creative Mail option copy is `Emails made easy with Creative Mail`.
### Store profiler - Added MailPoet to Business Details step #6503
- Create a brand new site and go to the OBW.
- In the first OBW step (`Store Details`) set a Country / Region other than `US | BR | FR | ID | GB | DE | VN | CA | PL | MY | AU | NG | GR | BE | PT | DK | SE | JP` (e.g.: Uruguay).
- Continue with the profiler.
- In the 4th step (`Business Details`) choose any of the options in both selectors.
- The note is removed on a new version install, so either install an old version of WCA and upgrade to the current one, or trigger the install process manually:
- Clear existing site transients. For example, by using the [Transients Manager](https://wordpress.org/plugins/transients-manager/) plugin, and pressing the "Delete all transients" button it provides.
- Add any new theme to WordPress but **DO NOT** activate it.
- Initialize the Onboarding Wizard.
- See that the Themes step loads fast 😎
- See that the new theme is listed in the Themes step.
### Set up tasks can now navigate back to the home screen #6397
1. With a fresh install of wc-admin and woocommerce, go to the home screen
2. Going to the homescreen redirects to the profile setup wizard, click "Skip setup store details" to return to the home screen
3. On the home screen you will see the setup task list. It has the heading "Get ready to start selling"
For each task in that list apart from "Store details":
1. Click the item
2. You should land on the setup task page
3. A title in the top left should reflect the original task name from the task list. e.g. "Add tax rates"
4. Clicking the chevron to the left of the title should take you back to the home screen
- Delete the option `woocommerce_ces_shown_for_actions` to make sure CES prompt triggers when updating settings.
- Enable the logging of Tracks events to your browser dev console `localStorage.setItem( 'debug', 'wc-admin:tracks' );`
- If you don't have a product CSV export, you can obtain a sample CSV [here](https://gist.githubusercontent.com/ilyasfoo/507f9579531cf4bf50fe4c0e9c48a23d/raw/05e47e6731471464c757e893c3f2d8a9b89453c0/product-export.csv).
- Go to Products > All Products.
- Click on "Import".
- Upload CSV file and finish the import process.
- Observe CES prompt "How easy was it to import products?" is displayed.
### Fix a bug where the JetPack connection flow would not activate #6521
1. With a fresh install of wc-admin and woocommerce, go to the home screen
2. Going to the homescreen redirects to the profile setup wizard
3. The first step is "Store details" choose United States (any state) for country and fill in the other details with test data.
4. Click "continue", you should be taken to the "Industry" step.
5. In the "Industry" step check the "Food and Drink" option only. Click "continue"
6. In the "Product Type" step choose any value and click "continue"
7. You should arrive at the "Business details" step which provides 2 tabs: "Business details" and "Free features". In the "Business Details" tab fill out the dropdowns with any values. Click "continue".
8. In the "Free features" step expand the list of extensions to install by clicking the arrow to the right of "Add recommended business features to my site".
9. Uncheck all the extensions except for "Enhance speed and security with Jetpack"
10. Click "continue", the plugin will be installed and you should arrive at the theme step.
11. Click "Continue with my active theme"
12. After finishing the wizard, this should redirect you to the "Jetpack" setup connection flow. (You should not be redirected straight to the homescreen).
### Update target audience of business feature step #6508
Scenario #1
1. With a fresh install of wc-admin and woocommerce, go to the home screen, which starts the onboarding wizard
2. Fill out the store details with a canadian address (addr: 4428 Blanshard, country/region: Canada -- British Columbia, city: Victoria, postcode: V8W 2H9)
3. Click continue and select **Fashion, apparel, and accessories**, continue, and select **Physical products**, and continue.
4. The business details tab should show a **Business details** tab, and a **Free features** tab (disabled at first)
8. Click continue, and select your theme, after it should redirect to the home screen (showing the welcome modal, you can step through this).
9. The home screen task list should include a **Set up WooCommerce Payments** task, and there should also be a **Set up additional payment providers** inbox card displayed (below the task list).
10. Go to **Plugins > installed Plugins**, check if the selected plugin features selected in step 7 are installed and activated.
Scenario #2
1. With a fresh install of wc-admin and woocommerce, go to the home screen, which starts the onboarding wizard
2. Fill out the store details with a spanish address (addr: C/ Benito Guinea 52, country/region: Spain -- Barcelona, city: Canet de Mar, postcode: 08360)
3. Click continue and select **Fashion, apparel, and accessories**, continue, and select **Physical products**, and continue.
4. On the business details tab select **1-10** for the first dropdown, and **No** for the second.
- Install and activate [WC Admin Test Helper](https://github.com/woocommerce/woocommerce-admin-test-helper/wiki/Admin-notifications).
- Make sure the `woocommerce_merchant_email_notifications` option is set to `yes` by [using the update option tool](https://github.com/woocommerce/woocommerce-admin-test-helper/wiki/Update-option).
### Add Guards to "Deactivate Plugin" Note Handlers #6532
#### Test incompatible WooCommerce version
- Install and activate Woocommerce 4.7
- See that the Woocommerce Admin plugin is deactivated.
- Add the Deactivate Plugin note via SQL.
```
INSERT INTO `wp_wc_admin_notes` (`name`, `type`, `locale`, `title`, `content`, `content_data`, `status`, `source`, `date_created`, `date_reminder`, `is_snoozable`, `layout`, `image`, `is_deleted`, `icon`) VALUES ( 'wc-admin-deactivate-plugin', 'info', 'en_US', 'Deactivate old WooCommerce Admin version', 'Your current version of WooCommerce Admin is outdated and a newer version is included with WooCommerce. We recommend deactivating the plugin and using the stable version included with WooCommerce.', '{}', 'unactioned', 'woocommerce-admin', '2021-03-08 01:26:44', NULL, 0, 'plain', '', 0, 'info');
```
- See that the note is in the inbox
- Activate the Woocommerce Admin plugin.
- See that Woocommerce Admin immediately de-activates without a fatal error.
- See that the note remains in inbox
#### Test compatible WooCommerce version
- Deactivate the Woocommerce Admin plugin.
- Install and activate the latest Woocommerce version.
- Add the Deactivate Plugin note via SQL.
```
INSERT INTO `wp_wc_admin_notes` (`name`, `type`, `locale`, `title`, `content`, `content_data`, `status`, `source`, `date_created`, `date_reminder`, `is_snoozable`, `layout`, `image`, `is_deleted`, `icon`) VALUES ( 'wc-admin-deactivate-plugin', 'info', 'en_US', 'Deactivate old WooCommerce Admin version', 'Your current version of WooCommerce Admin is outdated and a newer version is included with WooCommerce. We recommend deactivating the plugin and using the stable version included with WooCommerce.', '{}', 'unactioned', 'woocommerce-admin', '2021-03-08 01:26:44', NULL, 0, 'plain', '', 0, 'info');
```
- Activate the Woocommerce Admin plugin.
- See that note is **not** in the inbox
- Add the Deactivate Plugin note via SQL.
```
INSERT INTO `wp_wc_admin_notes` (`name`, `type`, `locale`, `title`, `content`, `content_data`, `status`, `source`, `date_created`, `date_reminder`, `is_snoozable`, `layout`, `image`, `is_deleted`, `icon`) VALUES ( 'wc-admin-deactivate-plugin', 'info', 'en_US', 'Deactivate old WooCommerce Admin version', 'Your current version of WooCommerce Admin is outdated and a newer version is included with WooCommerce. We recommend deactivating the plugin and using the stable version included with WooCommerce.', '{}', 'unactioned', 'woocommerce-admin', '2021-03-08 01:26:44', NULL, 0, 'plain', '', 0, 'info');
- Confirm that `woocommerce_merchant_email_notifications` was not set before by `core`.
- Install and activate [WC Admin Test Helper](https://github.com/woocommerce/woocommerce-admin-test-helper/wiki/Admin-notifications).
- Delete `woocommerce_merchant_email_notifications` if present [using the update option tool](https://github.com/woocommerce/woocommerce-admin-test-helper/wiki/Update-option).
1. Create various non-admin users with custom capabilities. Make sure to not include the `view_woocommerce_reports` for at least one role. https://wordpress.org/plugins/leira-roles/
4. Check that there aren't items shown to the user they should not be able to use or interact with.
5. Enable the new navigation under WooCommerce -> Settings -> Advanced -> Features.
6. Check that the users are able to see the new navigation menu.
7. Click on various tabs in the activity panel.
8. Make sure the tabs work as expected.
9. Make sure that users without the `manage_woocommerce` permission are not able to see the "Store Setup" tab.
10. With a user that can `manage_woocommerce`, navigate to the homepage via URL and make sure the homescreen is shown. `/wp-admin/admin.php?page=wc-admin`
11. With a user that cannot `view_woocommerce_reports` make sure navigating to an analytics report does not work. `/wp-admin/admin.php?page=wc-admin&path=/analytics/overview`
- You'll need a site that has the setup task list visible. Complete the OBW and make sure you're in a Mollie supported country (Such as United Kingdom).
- Go to the setup payments task
- Mollie should be listed as an option
- Click "Set up" button on the Mollie task
- It should install and activate the mollie payments plugin
- The connect step should provide links to create an account or go straight to Mollie settings. (test both links work)
- Click "continue"
- You should arrive back at the payment provider list
- Confirm the new note is displayed and that the content matches that specified below:
- Title: Getting Started in eCommerce - webinar
- Copy: We want to make eCommerce and this process of getting started as easy as possible for you. Watch this webinar to get tips on how to have our store up and running in a breeze.
- Starting with a fresh store (or by deleting the woocommerce_task_list_welcome_modal_dismissed option), visit /wp-admin/admin.php?page=wc-admin. You should see the standard welcome modal.
- Add &from-calypso to the URL. You should see the Calypso welcome modal.
- Notice "Learn more" links to https://wordpress.com/support/new-woocommerce-experience-on-wordpress-dot-com/
- Click the `Start with a template` option, and select either a physical, digital, variable product
- Once you click `Go`, it should redirect you to an edit page of the new post, with the data from the sample-data.csv (mentioned in the original ticket). Only the title is missing, as it is saved as auto-draft.
- You should be able to save the new product as draft or publish it.
- You should be able to exit without making any changes, and not having the product show up as draft in your product list.
- Create new product from template
- Wait until redirected
- Without saving go to the **Products > all products** page, the new product should not be displayed.
- Create new woo store, and finish the onboarding wizard
- Go to the home screen, and click the **Set up payments** task. **Paypal Payments** option should be listed as an option, with a **Set up** button.
- Click **Set up** on the Paypal plugin.
- It should automatically start the **Install** step, and install and enable the [Paypal Payments](https://woocommerce.com/products/woocommerce-paypal-payments/) plugin.
- For Paypal Payments version greater then `1.1.0`.
- For the second step it should show a `Connect` button
- Click on **Connect** and a window should popup for Paypal, follow this until finished. The last button is - Go back to Woocommerce Developers
- Once done, the page should reload, and briefly show the setup screen again, it should then finish and go back to the payment list.
- Once on the payment list, the `Set up` button should be gone, and instead show a toggle, that is set to enabled.
- The enable/disable button should be correctly reflected in the Woocommerce payment settings screen as well.
- For Paypal Payments version `1.1.0` and below
- For the second step it will show the manual fields (merchant email, merchant id, client id, client secret).
- Check if the help links work below, they should help with finding the above credentials.
- If you have a business account set up, you can find the credentials in these two places
- [Get live app credentials](https://developer.paypal.com/developer/applications/)