Commit Graph

688 Commits

Author SHA1 Message Date
Bec Scott 209dbef800 Add manage orders on the go admin note (https://github.com/woocommerce/woocommerce-admin/pull/5159)
* Rename admin notes classes and file names to fit conventions

* Use a facade class that adds deprecation warnings to each function call

* Add "Manage orders on the go" admin note

* Remove a rebase zombie 🙀

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-13 14:35:53 +10:00
Paul Sealock ad7cf64303 Navigation: Add client code (https://github.com/woocommerce/woocommerce-admin/pull/5309)
* is_feature_enabled

* feature class

* copy/paste

* hooked up

* its alive

* add wc-admin items

* clean up entry point

* Analytics remove url

* rebase error

* add back in check is_feature_enabled

* specificity CSS
2020-10-13 14:40:53 +13:00
Paul Sealock c9242f7122 Navigation: Move PHP code to WC Admin (https://github.com/woocommerce/woocommerce-admin/pull/5308)
* is_feature_enabled

* copy/paste

* hooked up

* text domain

* rebase fix

* text domain
2020-10-13 13:49:39 +13:00
Paul Sealock c089b49b38 Navigation: Prep feature flags and option (https://github.com/woocommerce/woocommerce-admin/pull/5292)
* add feature flag

* hydrate options on embedded screens

* is_feature_enabled

* feature class

* feedback

* better name

* fix
2020-10-13 13:05:06 +13:00
Bec Scott 61c189f456 Add option remote inbox notifications rule processor (https://github.com/woocommerce/woocommerce-admin/pull/5206)
* Add option remote inbox notifications rule processor

* Add default option value to option rule

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-13 08:47:12 +10:00
Jeff Stieler 8a0f580d1b Check for connected JP+WCS and non-ShipStation country for shipping defaults. (https://github.com/woocommerce/woocommerce-admin/pull/5320)
Fix UK country code too.
2020-10-09 13:28:41 -07:00
Sam Seay f6cd6c25c8 Ensure that the iOS smart banner is rendered on embed pages as well as wc-admin pages. (https://github.com/woocommerce/woocommerce-admin/pull/5311) 2020-10-08 19:17:11 -07:00
Joshua T Flowers 91e57586f4 Load onboarding data when enabled or directly visiting (https://github.com/woocommerce/woocommerce-admin/pull/5290)
* Always load onboarding data in component global settings

* Load onboarding data when enabled or directly visiting
2020-10-08 17:10:55 -07:00
Timmy Crawford 178278c951 Change WooCommerce Services to WooCommerce Shipping & Tax. (https://github.com/woocommerce/woocommerce-admin/pull/5305) 2020-10-08 14:15:29 -07:00
Sam Seay 259489a0b9 Fix a bug in tax automation logic and track the event in analytics (https://github.com/woocommerce/woocommerce-admin/pull/5276) 2020-10-08 14:08:03 +13:00
Bec Scott 1c009dd9e7 Add/confirm tax settings note (https://github.com/woocommerce/woocommerce-admin/pull/5279)
* Add note to confirm automated tax settings

* add back automated_tax_is_supported function

* Trigger CI

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-08 09:12:31 +10:00
Bec Scott 51867b3d3b Add @deprecated tag to DeprecatedNotes comments (https://github.com/woocommerce/woocommerce-admin/pull/5283)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-08 09:09:33 +10:00
Paul Sealock a4e8f6996c Navigation: Update PHP registration (https://github.com/woocommerce/woocommerce-admin/pull/5255)
* UPdate to new registration API

* conditionally add path to Overview

* add comment

* change to is_top_level
2020-10-08 10:10:37 +13:00
Joel Thiessen 23c19ee1b2 Removing breadcrumbs from wc-admin header, replacing with simple titl… (https://github.com/woocommerce/woocommerce-admin/pull/5232)
Removing breadcrumbs from wc-admin header, replacing with simple title (https://github.com/woocommerce/woocommerce-admin/pull/3963)

This is an interim step towards the integration of wc-navigation, where a back button will be provided to restore the critical functionality of the breadcrumbs. Note that the `breadcrumbs` data was preserved since it's still being utilized do construct the document title (in semi-breadcrumb-fashion) on both the backend and front-end.
2020-10-06 13:42:46 -07:00
Joshua T Flowers 173b8c6262 Update store setup link to redirect to setup wizard (https://github.com/woocommerce/woocommerce-admin/pull/5200) 2020-10-06 23:35:54 +03:00
Jeff Stieler e62114e307 Remove dynamic content hash from chunk names. (https://github.com/woocommerce/woocommerce-admin/pull/5229)
* Don't auto generate chunk names.

This should make SVN diffs much easier to navigate for WP.org deploys.

* Include script version parameter in async chunk requests.

* Add version parameter to CSS chunks.
2020-10-06 08:58:15 -04:00
Jeff Stieler 2358f022ef Declare the note constants on the deprecated class. (https://github.com/woocommerce/woocommerce-admin/pull/5215)
* Declare the note constants on the deprecated class.

This avoids triggering PHP errors when third party code references the old class constants.

* Remove deprecation notices and return the call result

* Restore deprecated notices.

* Avoid magic strings.

* Pass WC_Admin_Note constructor argument to migrated class.

* Allow subclasses to access the facade class instance.

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-06 08:56:40 -04:00
Bec Scott 9906c6c1b3 Add note status remote inbox notifications rule processor (https://github.com/woocommerce/woocommerce-admin/pull/5207)
* Add note status remote inbox notifications rule processor

* Notes class rename

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-06 07:51:59 +10:00
Timmy Crawford 6db5126771 Onboarding: Remove check for legacy onboarding in redirect logic. (https://github.com/woocommerce/woocommerce-admin/pull/5230) 2020-10-01 06:08:41 -07:00
Adrian Duffell f08ccc57d7 Remove customer analytics data upon order deletion (https://github.com/woocommerce/woocommerce-admin/pull/5171)
This deletes the associated customer record when an order is deleted, provided that this is the only order for the customer.
2020-10-01 20:09:04 +08:00
Bec Scott 6ad7be3d58 Fix wakeup visibility for PHP 8 compatibility (https://github.com/woocommerce/woocommerce-admin/pull/5211)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-30 13:51:25 +10:00
Joshua T Flowers 1d3b9c0573 Redirect to setup wizard when activation transient is present (https://github.com/woocommerce/woocommerce-admin/pull/5214) 2020-09-29 17:14:04 -07:00
Jeff Stieler 6db31e351f Check to enable automated taxes after Jetpack connection is made. (https://github.com/woocommerce/woocommerce-admin/pull/5210) 2020-09-29 16:57:06 -07:00
Bec Scott 2ba064abf4 Remove product settings video note (https://github.com/woocommerce/woocommerce-admin/pull/5213)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-29 13:16:59 -07:00
Fernando 2cf7ea56a8 Onboarding - Store Profiler - Removed selected CBD option for eCommerce plan (https://github.com/woocommerce/woocommerce-admin/pull/5124)
* Added filter to selected industries list

This commit adds a filter to the selected industries list

* Fixed lint error

* Fixed lint issues

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-29 08:10:40 -07:00
Bec Scott 27a6b4d967 Add rule processors for country and state (https://github.com/woocommerce/woocommerce-admin/pull/5203)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-29 15:21:44 +10:00
Bec Scott ad8f8c5b08 Rename admin notes classes and file names to fit conventions (https://github.com/woocommerce/woocommerce-admin/pull/5142)
* Rename admin notes classes and file names to fit conventions

* Use a facade class that adds deprecation warnings to each function call

* Tidy up after rebase

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-28 14:35:10 +10:00
Joshua T Flowers 45ea46a6f1 Pass Stripe supported countries in tasks status REST API (https://github.com/woocommerce/woocommerce-admin/pull/5197) 2020-09-25 19:21:06 +03:00
Jeff Stieler 264aa8dee4 Add Variations Report (https://github.com/woocommerce/woocommerce-admin/pull/5167)
* Add initial Variations Report to analytics feature.

* Restrict query to variations when not specifying any product IDs.

* Add route to get variations without specifying a parent.

* Move variations table component to variations report directory.

* Add missing LIMIT clause to variations report query.

* Remove broken features from Variations table.

* Add Variations report controller to CSV emailer.

* Add initial Variation Stats endpoint, based on Product Stats.

* Hook Variations Report components up to new stats endpoint.

* Hook attribute filter up to variations report queries.

* Remove variation title filter usage.

See: https://github.com/woocommerce/woocommerce-admin/pull/5100

* Use filtered separator in variation name formatting.

* Add "single variation" to variations report, fix autocompleter API request.

* Fix segmentation by variation.

* Add comparison to variations report.

* Always include manually specified variations in report results.

* Fix variations report table comparison mode.

The ReportTable component expects the `filter` query param.

* Fixing styling of compare button without table search component.

* Add variation filter to Orders report.

* Link orders count to orders report filtered by variation.

* Orders report: include variation attributes in product names.

* Further style tweaks for variations report download button.

* Add variations filter to order stats query.

* Clean up "category includes" login in REST controllers.

Prep for "category excludes" in the Variations report.

* Support category exclusion in report filters.

* Fix filter param used by the variation report table component.

* Add category filter to variations report.

* Fix initial selected ReportTable rows when using non-default compareParam.

* Add a new autocompleter for variable products.

* Add products filter to variations report.

* Fix tests.

* Handle variation IDs that are no longer found.

* Add documentation.

* Use getSetting() instead of directly accessing window properties in client code.

* Fix ordering Variations by SKU.
2020-09-25 09:57:48 -04:00
Paul Sealock 4b8a03d83b add dependencies in loader (https://github.com/woocommerce/woocommerce-admin/pull/5169) 2020-09-25 12:20:21 +12:00
Fernando 4aa01340ab Store Profiler - Industry: reduced padding and removed industry (https://github.com/woocommerce/woocommerce-admin/pull/5157)
* Reduced list padding

This commit reduces the industries list "padding" and its "min-height"

* Removed item from industries list

This commit removes the item "Art, Music & Photography" from the industries list

* Fixed e2e tests

This commit fixes the e2e tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-22 09:20:42 -03:00
Adrian Duffell 49f74d8b15 Add check for remote inbox notifications opt-out (https://github.com/woocommerce/woocommerce-admin/pull/5162)
The marketplace suggestions opt-out is now used to determine if remote inbox notifications should be fetched. This corresponds to the
`woocommerce_show_marketplace_suggestions` WP option.

Additionally, a new protected method is added to the class. This provide a series of checks for whether remote notifications are enabled on the site.
2020-09-18 13:53:49 +08:00
Jason Conroy a60f59fa10 Add Google Ads & Marketing by Kliken Note Provider (https://github.com/woocommerce/woocommerce-admin/pull/5107)
* Remove Facebook Experts note

* Swap Facebook Marketing Experts Note for Google Ads and Marketing

* Update db version for 1.6.0
2020-09-17 10:50:49 -07:00
Francesco 36f61c89f1 chore: rename WCS to WC Shipping & Tax (https://github.com/woocommerce/woocommerce-admin/pull/5139) 2020-09-16 16:45:16 -05:00
Paul Sealock d057022caf force to a float (https://github.com/woocommerce/woocommerce-admin/pull/5149) 2020-09-17 08:33:52 +12:00
Jeff Stieler 3abeda602a Search all variation attribute values, not just global ones. (https://github.com/woocommerce/woocommerce-admin/pull/5141)
* Search all variation attribute values, not just global ones.

* Fix variations test for WC < 4.4.
2020-09-16 09:57:38 -04:00
Jeff Stieler b531f51cad Don't include "min" suffix in build JavaScript when targeting core. (https://github.com/woocommerce/woocommerce-admin/pull/5130)
Files with "min" are ignored by GlotPress / translate.wp.org.
2020-09-15 11:36:58 -04:00
Bec Scott 90567853de Enable the home screen for everybody (https://github.com/woocommerce/woocommerce-admin/pull/5108)
* One-shot to enable the homescreen for everybody

* Make the home page the default (only) experience

* remove option check in activity panel tabs, get tests working, fix lint issues

* Remove is-homescreen CSS class

* Remove extra home page route registration

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-15 09:44:46 +10:00
Bec Scott baad343599 Add filters for columns in reports (https://github.com/woocommerce/woocommerce-admin/pull/5134)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-15 08:29:09 +10:00
Bec Scott 5310944f17 Add option to not charge sales tax (https://github.com/woocommerce/woocommerce-admin/pull/5111)
* Add option to not set up sales tax

* Correct JS lint errors

* Add abort option to plugin step

* Inline redirect to home page

* Use testing-library/react for the new test

* Also set woocommerce_calc_taxes to 'no'

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-14 08:50:02 +10:00
Fernando 11656dcd6c Modified connection check (https://github.com/woocommerce/woocommerce-admin/pull/5129)
This commit modifies the connection check for the note 'wc-admin-wc-helper-connection'

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-12 11:56:33 -03:00
Jeff Stieler 35ee9901bc Avoid changing product titles by removing variation title filter usage. (https://github.com/woocommerce/woocommerce-admin/pull/5100)
* Remove use of `woocommerce_product_variation_title_include_attributes` filter.

* Use attribute values in product variation titles.

* Include attribute values in product variation name during segmentation.

* Include attribute values in product variations autocompleter query.
2020-09-09 09:29:10 -04:00
Bec Scott 55a9944911 Add performance on mobile admin note (https://github.com/woocommerce/woocommerce-admin/pull/5106)
* Add performance on mobile admin note

* use MONTH_IN_DAYS constant

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-09 08:35:59 +10:00
Bec Scott 92b37234f6 Add Edit products on the move admin note (https://github.com/woocommerce/woocommerce-admin/pull/5054)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-08 09:01:12 +10:00
Jeff Stieler 4736c3fd27 Combine translation chunks when language packs are updated. (https://github.com/woocommerce/woocommerce-admin/pull/5094)
Removes version from filename and prevents WP_Filesystem use without successful initialization.
2020-09-07 12:46:39 -04:00
Timmy Crawford 89c7cede0c Onboarding: Set woocommerce_setup_jetpack_opted_in true on Jetpack connection. (https://github.com/woocommerce/woocommerce-admin/pull/5101) 2020-09-07 09:38:26 +10:00
Jeff Stieler ebfd28a9e6 Add product attribute filter to Orders Report. (https://github.com/woocommerce/woocommerce-admin/pull/5068)
* Add product attribute filter to Orders report config.

* Add attribute args to Orders report controller.

* Include attribute filters in orders report query.

* Add attribute args to Orders Stats report controller.

* Include attribute filters in orders report stats query.

* Add test for product attribute filter in orders report.

* Add tests for invalid parameter values.

* Add tests for product attribute filter in order stats endpoint.

* Fix tests for PHP 5.6 and WC 3.8.x.
2020-09-03 10:08:06 -04:00
Sam Seay 2146ccb78e Add an automated taxes smart default (https://github.com/woocommerce/woocommerce-admin/pull/5076) 2020-09-03 14:56:52 +12:00
Jason Conroy 0e42d2794d Consistently use USA spelling of optimize (https://github.com/woocommerce/woocommerce-admin/pull/5067) 2020-09-03 10:29:04 +09:30
Jeff Stieler bc39bdf646 Show full variation name instead of parent product in orders report. (https://github.com/woocommerce/woocommerce-admin/pull/5056) 2020-09-01 08:22:36 -04:00
Timmy Crawford 08a0ec3739 Remove industry option for travel. (https://github.com/woocommerce/woocommerce-admin/pull/5065) 2020-09-01 13:45:14 +10:00
Chris Shultz 570de23747 Stop using missing installPlugin function and fix WCS 1.24 compatibility (https://github.com/woocommerce/woocommerce-admin/pull/5025)
* Update Shipping Banner to use installPlugins since installPlugin has been removed.

* Fix shipping banner compatibility with WCS 1.24.

* Update metabox content to match WC 4.5 metaboxes.
2020-08-31 08:13:14 -07:00
Sam Seay dbec08f7dc When toggling the task list, record a track event. (https://github.com/woocommerce/woocommerce-admin/pull/5049)
Fixes woocommerce/woocommerce-admin#4760
2020-08-28 15:59:33 +12:00
Jeff Stieler 5e7f2af61d Rename "profile" to "store details". (https://github.com/woocommerce/woocommerce-admin/pull/4965)
* Rename "profile" to "store details".

* Missed some /profiler links.

* Fix linter error.

* Store details => Setup Wizard.

* Rename task list item.
2020-08-27 08:10:23 -04:00
Bec Scott 550445e1a4 Add error logging to remote inbox notifications data source poller (https://github.com/woocommerce/woocommerce-admin/pull/4922)
* Add error logging to remote inbox notifications data source poller

* Change DataSourcePoller to use WC_Logger

* Remove test feed

* Tidy up log messages

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-27 15:47:37 +10:00
Sam Seay c884f96bf9 Add WooCommerce Mobile App Banner Ad for Android and iOS (https://github.com/woocommerce/woocommerce-admin/pull/5037)
Fixes woocommerce/woocommerce-admin#4654 

The feature calls for a mobile app ad banner to be displayed to users on mobile devices.

Based on the discussion in woocommerce/woocommerce-admin#4654 this implements the following:

1. [an iOS Smart App Banner](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html). This banner is a meta tag that is generated in PHP. It will only display on iOS devices. One note about this: **This tag is not directly trackable like the implemented Android banner. If we would like to track its success then I believe [these instructions are relevant](https://stackoverflow.com/questions/12906502/is-it-possible-to-track-click-throughs-from-iphone-smart-banner/20422334woocommerce/woocommerce-admin#20422334)**. 

2. A mobile app banner ad that **only displays on Android** and only displays at the `738px` breakpoint specified in the issue. To only display this banner ad on Android, we use basic checking of the user agent string. I weighed this up against other approaches and for this kind of niche use case a simple UA string check is (imho) still the best way to do this.

3. The banner ad makes use of user preferences to retain a per user setting that determines if that user has dismissed the Android banner. We don't/can't do anything like this for the iOS Smart App Banner (but in theory we shouldn't need to).
2020-08-27 13:46:53 +12:00
Bec Scott 0bf9ef371c Add new note: Selling online courses (https://github.com/woocommerce/woocommerce-admin/pull/5036)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-26 14:11:14 +10:00
Joshua T Flowers d4dd74e44a Remove onboarding feature flag and a/b testing (https://github.com/woocommerce/woocommerce-admin/pull/4999)
* Remove store page creation during new onboarding experience

* Remove onboarding feature flag

* Add back in onboarding feature flag to enable feature loading
2020-08-25 00:51:41 +03:00
Jeff Stieler eea63f602f Refactor task list status to onboarding data store. (https://github.com/woocommerce/woocommerce-admin/pull/4998)
* Add onboarding task status API endpoint.

* Add task status to onboarding data store.

* Update appearance task to use onboarding store for status info.

* Update main task list component to use onboarding data store for status info.

* Clear onboarding status info "cache" when setting shipping rates in the task list.

* Clear onboarding status info "cache" when enabling payment methods from the task list.

* Fix onboarding data store reducer tests.

* Clean up redundant code, nest task status settings under new key for hydration.

* Include tasks status in onboarding data hydration.

* Update tax task to use onboarding data store for status info.

* Avoid continually rehydrating onboarding data.

* Refactor payment task method retrieval to use onboarding data store.

* Fix bug with disappearing appearance tax steps.

* Update appearance completion faster by using hydrated onboarding value.

* Avoid PHP warnings when onboarding isn't enabled.

* Remove unused imports.
2020-08-24 09:20:57 -04:00
Joshua T Flowers 07b3c87f6b Add filter to allow modification of report columns (https://github.com/woocommerce/woocommerce-admin/pull/4984)
* Add filter to allow modification of report columns

* Check for report columns existence before filtering
2020-08-24 14:18:48 +03:00
Daniel Bitzer d8098d6fd7 Adds `@woocommerce/tracks` package (https://github.com/woocommerce/woocommerce-admin/pull/5017)
* Add @woocommerce/tracks package.json

* Add @woocommerce/tracks .npmrc

* Move lib/tracks.js in to tracks package

* Add tracks package debug dependency

* Add readme for tracks package

* Add changelog for tracks package

* Add info about debugging and opt-ins to tracks package readme

* Load tracks package script

* Add tracks package to packages readme

* Add tracks package to webpack config

* Add tracks package external to starter-pack

* Replace lib/tracks uses with @woocommerce/tracks

* Update package-lock.json
2020-08-20 14:29:52 +09:30
Jeff Stieler c16da34c30 Migrate export data store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4958)
* Add export ID to success response and fix typos in endpoint schema.

* Initial export data store.

Allows for starting export, but not checking progress.

* Use new export data store in analytics report tables.

* Remove defunct report export wc-api files.

* Apply review feedback from another wp.data PR.

* Use getResourceName() util for more DRYness.

* Fix linter error.

* Add response status code to fetchWithHeaders control.

* Use HTTP status rather than response body to determine success.

* Fix tests.

* Remove unused import from actions.
2020-08-18 09:04:58 -04:00
Bec Scott 4e8ca09a3a Remove composite products from onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4996)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-18 10:56:36 +10:00
Paul Sealock 5cbd4ed521 Documentation: Fix Add Report (https://github.com/woocommerce/woocommerce-admin/pull/4991)
* Update readme

* better
2020-08-18 09:45:21 +12:00
Manos Psychogyiopoulos a236f6d79f Add 'woocommerce_analytics_update_order_stats_data' filter (https://github.com/woocommerce/woocommerce-admin/pull/4934) 2020-08-14 15:59:29 +03:00
Jeff Stieler 025860c879 Delete associated customer analytics data when user is deleted from WordPress. (https://github.com/woocommerce/woocommerce-admin/pull/4977)
* Delete customer lookup rows when their corresponding user is deleted.

* Asynchronously delete users from customer lookup table.

* Add user deletion test case.

* Fix user deletion test.
2020-08-13 09:23:51 -04:00
Joshua T Flowers 483055dd75 Migrate notes data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4943)
* Add initial notes data store using wp data

* Cache individual note queries

* Update notes undo endpoint to batch update endpoint

* Allow batch updates of notes

* Add requesting state

* Update components to use new note store

* Remove old notes store from wc-api

* Get note IDs from json and validate data in REST API

* Add an updating state to each note

* Throw errors in actions so they can be caught by client

* Add store reducer tests

* Handle PR feedback

* Fix failing tests

* Don't set inbox panel visibility while batch updating

* Move woocommerce block to external dependencies
2020-08-13 16:23:38 +03:00
Joshua T Flowers 260843c528 Fix industry args type in REST API (https://github.com/woocommerce/woocommerce-admin/pull/4974)
* Fix industry args type in REST API

* Only allow object for industry param

* Fix onboarding industry object shape in test case.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-08-12 15:57:55 +03:00
Claudio Sanches 073a3f706f Fix usage of "package" tag in file headers (https://github.com/woocommerce/woocommerce-admin/pull/4940)
* Don't require package tag or file comment inside src

* Removed package tag from files inside src

* Fixed tests directory in phpcs.xml.dist

* Fixed usage of package tag

* Fixed new classes

* Fixed coding standards

* Fixed coding standards in tests
2020-08-11 16:18:47 -03:00
Joshua T Flowers 92a8a58d2b Remove payment task actions (https://github.com/woocommerce/woocommerce-admin/pull/4917)
* Remove task list payment actions

* Check that the payments task has been marked complete in checkout note

* Track payments completion via enabled gateways

* Allow toggling to unfinish task when no payments enabled
2020-08-11 15:20:48 +03:00
Bec Scott b511469dc8 Automatically add free local shipping zone on completing the profiler (https://github.com/woocommerce/woocommerce-admin/pull/4857)
* Set up profile completed action

* Stub out the steps

* Only run if Jetpack is installed and connected

* Return if WCS isn't active

* Return unless physical is selected as a product type

* Return if there are existing shipping zones

* Shipping labels are enabled when WCS is installed

* Set up free local shipping

* Comment for the profiler complete action

* By default there is no international/catch-all shipping method set up

* Add review shipping settings note

* Record tracks event

* Fix logic

* Add unit test around setting up free local shipping

* Rename some functions

* Use countries service to get all countries

* Drop duplicated possibly_add_note()

* Check the old value when determining if the profiler has completed

* Fall back to country code if country name doesn't exist

* Use admin_url fn to build up URL

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-11 14:39:25 +10:00
Bec Scott 028e1fcab4 Post-release, update readme, bump versions to 1.6.0-dev (https://github.com/woocommerce/woocommerce-admin/pull/4950)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-11 11:05:03 +10:00
Timmy Crawford 2b7fddb16b Setup Payments: Add eWAY for AU/NZ Stores. (https://github.com/woocommerce/woocommerce-admin/pull/4947)
* Setup Payments: Add eWAY for AU/NZ Stores."

* Fix typo
2020-08-06 17:09:10 -07:00
Jeff Stieler 17d79a2d67 Load chunked translation data from language packs. (https://github.com/woocommerce/woocommerce-admin/pull/4937)
* Combine all JSON translation chunks into one file.

* Use WP_Filesystem.

* Handle core WooCommerce text domain when running as a package.
2020-08-05 15:29:05 -04:00
Jeff Stieler 239b6c95b8 Fix use of Jetpack autoloader. (https://github.com/woocommerce/woocommerce-admin/pull/4920)
* Require the correct autoloader file.

* Include composer file when updating version numbers.

* Add notice for development builds not using JETPACK_AUTOLOAD_DEV.

* Only bump version numbers when preparing a release.
2020-08-04 13:13:48 +12:00
Jeff Stieler 53031f3fae OBW: fix product types step bugs (https://github.com/woocommerce/woocommerce-admin/pull/4900)
* OBW: fix tooltip display on product types step.

* Restore physical products as default.

* Slight improvement to screen reader text.
2020-07-30 12:14:18 -04:00
Jeff Stieler 6bcf6510bd Fix build check for core. (https://github.com/woocommerce/woocommerce-admin/pull/4867)
Core package doesn't have unminified JS.
2020-07-28 10:52:32 -04:00
Jeff Stieler fe1e422039 Fix PHP warning when preloading scripts on WPEngine (https://github.com/woocommerce/woocommerce-admin/pull/4856)
* Handle missing script dependencies when preloading.

* Updated terminology.
2020-07-23 15:02:31 -04:00
Jeff Stieler cc8b7982a3 Fix child theme upload error (https://github.com/woocommerce/woocommerce-admin/pull/4852)
* Match method signature to parent class.

* Fix fatal error when installing a child theme.

* Fix undefined property notice.
2020-07-23 10:36:46 -04:00
Joshua T Flowers 7f9c5ae1d8 Register wca pages with wc navigation (https://github.com/woocommerce/woocommerce-admin/pull/4850) 2020-07-23 12:01:45 +03:00
Fernando 88a83e4d84 Remove item "profiler" from the menu (https://github.com/woocommerce/woocommerce-admin/pull/4851)
* Lint detail solved

This commit resolves a small lint warning in the file Loader.php

* Removed "profiler" from menu

This commit removes the item "profiler" from the menu.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-22 15:24:33 -03:00
Fernando ba12049b79 New notification: Don't forget to test your checkout (https://github.com/woocommerce/woocommerce-admin/pull/4805)
* Added Test Checkout note

This commit adds a note to test the checkout process

# Conflicts:
#	src/Events.php
#	src/FeaturePlugin.php

* Replaced method "site_url" with "wc_get_page_permalink"

* Removed products with state draft verifcation from "check_task_completion"

This commit modifies the code to not set the products task list item as done when they have state draft.

* Added published date control

This commit adds a product published date control to the note

* Half-hour calculation changed

* Typo error corrected

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-22 15:24:03 -03:00
Bec Scott 6ac2a5f74f Update versions (https://github.com/woocommerce/woocommerce-admin/pull/4846)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-22 16:20:23 +10:00
Bec Scott a82d359a5e Include activeTheme onboarding setting if the task list is shown (https://github.com/woocommerce/woocommerce-admin/pull/4834)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-22 09:55:25 +10:00
Ayub Adiputra e2d41ea718 Fix non-lowercase theme activation issue (https://github.com/woocommerce/woocommerce-admin/pull/4393) (https://github.com/woocommerce/woocommerce-admin/pull/4706)
Use sanitize_text_field instead of sanitize_title_with_dashes to clean up the theme name during theme activation and installation. Remove another sanitize_title because it also need to allow non-lowercase slug as well. Use the sanitized theme name as slug for:
- Checking whether current theme is allowed to activate
- Checking whether current theme is one of installed theme
- Slug of theme on Onboarding::get_theme_data() method.
2020-07-21 13:53:33 -07:00
Joshua T Flowers 3862223149 Update profiler reference links and loading state (https://github.com/woocommerce/woocommerce-admin/pull/4828)
* Update button to revisit the profiler

* Hide the wp admin UI when loading the profiler route
2020-07-21 13:39:53 -07:00
Bec Scott 551dfe1f0c Pills and tooltips in product step of OBW (https://github.com/woocommerce/woocommerce-admin/pull/4707)
* Add monthly product prices to OBW

* Remove description for physical and download products

* Use pills in product selection step of OBW

* Add missing translation wrapper, also convert some spaces to tabs

* Add pill to changelog

* Change pills to medium gray text and border

* Make everything line up correctly on smaller viewports

* Get the styles closer to the design

* Breakpoint to set font size to 11px

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-21 14:27:32 +10:00
Jeff Stieler 7b4f825bc7 Fix PHP Fatals from Notes DataStore when columns are missing. (https://github.com/woocommerce/woocommerce-admin/pull/4831)
* Handle admin note data read exceptions.

* Add test for notes datastore encountering an exception in read().

* Fix WC_Admin_notes::get_note() helper.

* Throw exception from WC_Admin_Note class instead.

Mimicking WC_Order, etc.

* Use helper method to retrieve existing notes.

* Use self for static calls.

* Check for valid note before updating in WCPay note class.

* Don't specify columns when fetching notes from the database.

* Fix deprecated function call.

Avoid calling deprecated set_icon() when passing data to WC_Admin_Note constructor.
2020-07-20 11:28:00 -07:00
Jeff Stieler 289d626551 Fix missing version update callback and add test (https://github.com/woocommerce/woocommerce-admin/pull/4816)
* Add test for plugin version DB update callbacks.

* Add 1.4.0 DB version update callback.
2020-07-16 12:08:40 -04:00
Fernando a7a59583c9 Added skip profiler functionality (https://github.com/woocommerce/woocommerce-admin/pull/4721)
* Added skip profiler functionality

This commit adds the skip profiler functionality, leaving the Home screen `Store details` as incomplete.

# Conflicts:
#	client/task-list/tasks.js

* Unit tests repaiared

* Added OBW page

This commit makes the necessary changes to add an OBW page

# Conflicts:
#	client/profile-wizard/index.js

* Event name changed

This commit renames the event name we were recording since it was wrong.

* Redirection modified

This commit modifies the way we do redirection

# Conflicts:
#	client/profile-wizard/index.js

* Removed `profiler` feature flag

* Removed `profiler` feature flag

This commit removes the `profiler` feature flag

* Added error handling for `updateProfileItems`

This commit adds error handling for the method `updateProfileItems`

* Update client/profile-wizard/index.js

Co-authored-by: Matt Sherman <matt.sherman@automattic.com>

* Removed "throw" from "then"

* Update client/dashboard/index.js

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/profile-wizard/index.js

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Modified redirection URL

This commit modifies the redirection URL.

# Conflicts:
#	client/task-list/tasks.js

# Conflicts:
#	client/profile-wizard/index.js

* Removed the variable "lastStep" and the related logic.

* Removed change of state for variable "skipped"

* Added error trowing to onboarding actions

This commit adds error trowing to onboarding actions

* Removed response handling for `updateProfileItems`

* Added default value for "profileItems" in Homescreen and Dashboard

* Removed `step` from OnboardingProfile and test

This commit removes the `step` from OnboardingProfile.php and from tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Matt Sherman <matt.sherman@automattic.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-07-16 12:17:10 -03:00
Jeff Stieler 973335f5d0 Allow Jetpack plugin to be manipulated via API from the home screen. (https://github.com/woocommerce/woocommerce-admin/pull/4817)
* Allow Jetpack plugin to be manipulated via API from the home screen.

Fixes issue where Jetpack's installation status wasn't visible if the OBW was skipped.

* Remove incorrect arguments from add_filter() call.
2020-07-15 15:39:03 -04:00
Timmy Crawford 946f701523 Setup Checklist: Fix Homepage Template (https://github.com/woocommerce/woocommerce-admin/pull/4807)
* Onboarding: Fix Homepage Template.

* Update product categories short code usage.
2020-07-15 09:20:47 -07:00
Jason Conroy c8de6b97be Add WooCommerce Admin Facebook Marketing Expert Note Provider. (https://github.com/woocommerce/woocommerce-admin/pull/4787)
* Add WooCommerce Admin Facebook Marketing Expert Note Provider.

* Fix number of orders and move cheaper check to be first

* Update title

* Update note title and copy

* Adjust orders_last_month check

* Return ids to speed up query

* Use PluginsHelper
2020-07-15 15:45:20 +09:30
Bec Scott 480362ca29 Admin note to install other payment providers (https://github.com/woocommerce/woocommerce-admin/pull/4795)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-15 12:09:49 +10:00
Fernando 6c4b78f899 Changed logic of "Set up payments" reminder (https://github.com/woocommerce/woocommerce-admin/pull/4792)
* Removed "woocommerce_task_list_payments" from note.

This commit removes the use of "woocommerce_task_list_payments" from the note "Set up payments"

* Removed task list check

This commit removes an out of date check we were doing to show the note

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-14 18:21:43 -03:00
Timmy Crawford 2ebfa828b7 Post-Release: Sync readme changelog, bump versions to 1.4.0-dev. (https://github.com/woocommerce/woocommerce-admin/pull/4780)
* Post-Release: Sync readme changelog, bump versions to 1.4.0-dev.

* Adding in missing changelog item.

* readme updates
2020-07-14 07:24:52 -07:00
Joshua T Flowers 49a0a9f3a2 Add option to dismiss tasks (https://github.com/woocommerce/woocommerce-admin/pull/4733)
* Add dismiss button as task list item option

* Add option to undo task dismissal

* Record modal dismissal event

* Add transition animation to list items

* Use key for list items instead of index

* Remove dismissed tasks on recompleting profiler steps
2020-07-14 13:46:25 +03:00
Bec Scott ceeac5b943 Readme for remote inbox notifications (https://github.com/woocommerce/woocommerce-admin/pull/4767)
* Readme for remote inbox notifications

* Document all of the rules

* Couple of tweaks

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-14 11:52:33 +10:00
Bec Scott 547f569b1c Add is_ecommerce rule (https://github.com/woocommerce/woocommerce-admin/pull/4773)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-14 11:40:20 +10:00
Bec Scott d4330181b4 Trigger a remote inbox notifications engine run when the OBW completes (https://github.com/woocommerce/woocommerce-admin/pull/4737)
* Trigger a remote inbox notifications engine run when the OBW completes

* Fix typo in state check

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-09 14:50:20 +10:00
Bec Scott 0faca8a0d7 Make sure product count and revenue items are set in choose niche note (https://github.com/woocommerce/woocommerce-admin/pull/4764)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-09 14:49:40 +10:00
Paul Sealock d0460c2f08 Variation Names: Allow long names to be shown (https://github.com/woocommerce/woocommerce-admin/pull/4715) 2020-07-08 15:25:51 +12:00
Bec Scott 3e79e973ab Toggle the “Physical products” checkbox on by default (https://github.com/woocommerce/woocommerce-admin/pull/4702)
* Toggle the “Physical products” checkbox on by default

* change 'preselect' to 'default'

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-08 12:14:57 +10:00
Bec Scott 643ca9b6fb Update "Deactivate old WCA version" note to be informational (https://github.com/woocommerce/woocommerce-admin/pull/4645)
* Install task to update selected notes if they need to be changed

* Add comment for filter

* Add some extra comments to explain things a little better

* Undo my implementation of modifying notes

* Add a SQL script to update deactivate plugin note type

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-08 10:15:00 +10:00
Timmy Crawford c0e1e441b0 REST API: Add support for legacy public function install_plugin. (https://github.com/woocommerce/woocommerce-admin/pull/4713)
* Add support for legacy public function install_plugin.

* Check for permissions on note action to install plugin.
2020-07-06 14:39:24 -07:00
Jeff Stieler 727a8a8f04 Avoid Jetpack REST API when retrieving active modules (https://github.com/woocommerce/woocommerce-admin/pull/4755)
* Make API init class a singleton.

For aid in testing.

* Use static Jetpack methods instead of the REST API to get active modules.

Include some helper methods for easier testing.

* Fix Jetpack module mocking in indicators test.

* Check for the expected Jetpack module method before calling.

* Ensure active Jetpack modules is an array.
2020-07-06 16:11:45 -04:00
Timmy Crawford c992b2fa7c Build: Don't Attempt to Load non-minified Assets in Core Build (https://github.com/woocommerce/woocommerce-admin/pull/4747)
* Build: Only load non-minified js assets when they are available in the build.

* Avoid multiple Loader instances.

* Fix feature filter name in test bootstrap.

* Fix feature filter used in Loader tests.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-07-06 10:39:58 -07:00
Joshua T Flowers 7fe59841f3 Fix up warnings in notes (https://github.com/woocommerce/woocommerce-admin/pull/4742) 2020-07-06 10:09:54 -07:00
Joshua T Flowers bfb8b68aa6 Remove navigation feature (https://github.com/woocommerce/woocommerce-admin/pull/4740) 2020-07-06 10:21:15 +03:00
Fernando 0dbbbdb900 Added default value to the note icon (https://github.com/woocommerce/woocommerce-admin/pull/4745)
This commit adds a default value to the note icon

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-02 17:21:10 -03:00
Fernando 7b1a485100 Added new note type (https://github.com/woocommerce/woocommerce-admin/pull/4686)
* Added new note type

This commit adds a new note type `survey`. The note is deleted after calling its CTA.

* Now using const from WC_Admin_Note

* Now using const from WC_Admin_Note in WC_Admin_Notes too

* Moved note deletion from NoteActions to WC_Admin_Notes

This commit moves the note deletion from NoteActions to WC_Admin_Notes. Also adds a hook to clean up actioned survey notes.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-02 15:56:06 -03:00
Bec Scott 90089a5416 Include Product Bundles and Product Add-ons as OBW product options (https://github.com/woocommerce/woocommerce-admin/pull/4705)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-02 10:42:45 +10:00
Joshua T Flowers 44dd1a25b5 Add bundle install UI to Business Details step (https://github.com/woocommerce/woocommerce-admin/pull/4695)
* Add simple business extension install form input

* Install all business extensions when checked

* Add popover with business extension benefits

* Remove errant hasInstallActivateError setState call

* Show popover on click and record event
2020-07-01 15:20:24 +03:00
Bec Scott 218c5e28d1 Remove the Composite products option (https://github.com/woocommerce/woocommerce-admin/pull/4703)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-26 08:38:55 -07:00
Fernando 0d35c1c791 Added event prop 'screen' to be recorded (https://github.com/woocommerce/woocommerce-admin/pull/4643)
* Added event prop to be recorded

This commit adds the event prop `screen` to `wcadmin_wcadmin_inbox_action_click`

* Getting screen name from referer

Now the we get the screen name from the referer

* The screen name is not being sent anymore to the API

The screen name is not sent anymore to the API. Also, the $screen_name is set as empty in the API to make the method more defensive.

* Created method `get_screen_name`

This commit moves the code related  to getting the screen name to a specific method.

* Added screen name recording for individual posts

This commits adds screen name recording for individual posts

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-25 10:36:59 -03:00
Jeff Stieler a6195efad6 Fix Historical (deleted) Coupon Reporting (https://github.com/woocommerce/woocommerce-admin/pull/4671)
* Add (failing) test for deleted coupon amounts in reporting.

* Always sync an ID into the order-coupon lookup table.

* Don't remove coupon data from order analytics when the coupon is deleted.

* Fix coupon ID lookup from order item metadata.

* Allow negative coupon_id in the lookup table.

Representing deleted coupons.

* Handle deleted coupons when gathering extended info.

* Add more tests for deleted coupon handling.

* Handle deleted coupons in coupons report table.

* Fix lint errors.
2020-06-25 08:51:17 -04:00
Bec Scott c04bfbbbbd Add education and travel to the onboarding industry types (https://github.com/woocommerce/woocommerce-admin/pull/4694)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-25 15:40:44 +10:00
Jeff Stieler b4d71224e6 Remove unnecessary rest API init action. (https://github.com/woocommerce/woocommerce-admin/pull/4691) 2020-06-24 14:10:54 -07:00
Bec Scott 89342be595 Check that the possibly_add_note function exists before calling it (https://github.com/woocommerce/woocommerce-admin/pull/4680)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-24 13:38:43 -07:00
Jeff Stieler 32c99fa4ea Add version 1.3.0 option update callback. (https://github.com/woocommerce/woocommerce-admin/pull/4668) 2020-06-24 08:23:35 -04:00
Bec Scott b185b5ae1f Add check that the order being queried is a valid order (https://github.com/woocommerce/woocommerce-admin/pull/4630)
* Add check that the order being queried is a valid query

* Return null instead of an empty string

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-23 08:59:11 +10:00
Daniel Rey López 86d2bc3837 Fix WCPay sometimes not appearing on the task list (https://github.com/woocommerce/woocommerce-admin/pull/4647)
* Fix WCPay sometimes not appearing on the task list

* preload general settings

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-06-23 10:18:35 +12:00
Jeff Stieler 7c57978c7e Remove duplicate/redundant inbox note after first order received. (https://github.com/woocommerce/woocommerce-admin/pull/4659) 2020-06-22 16:00:39 -04:00
Fernando e0df6fa899 Inbox panel - Actioned inbox notifications now are visible (https://github.com/woocommerce/woocommerce-admin/pull/4621)
* Fix: Actioned inbox notifications now are visible

This commit fixes the actioned inbox notifications, now they are always visible.

* Fixed getUnreadNotes method

This commit fixes the getUnreadNotes method since it was returning the wrong information.

* Added two @todo

This commit adds two @todo referring to a few changes to do after implementing pagination

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-22 11:53:36 -03:00
Fernando 9a3b68aca9 Added new notification to customize the client store with blocks (https://github.com/woocommerce/woocommerce-admin/pull/4616)
This commit adds a new notification to customize the client store with WooCommerce blocks

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-22 09:49:24 -03:00
Bec Scott 2f60aeed2f Change the "Deactivate plugin" admin note to be informational (https://github.com/woocommerce/woocommerce-admin/pull/4629)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-19 10:39:25 +10:00
Bec Scott 5529156480 Add a 30 day upper limit to the need some inspiration admin note (https://github.com/woocommerce/woocommerce-admin/pull/4623)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-19 09:53:53 +10:00
Ron Rennick 8a22576a95 Count total unique customers instead of new/returning in order stats (https://github.com/woocommerce/woocommerce-admin/pull/4430)
* Count total unique customers instead of new/returning in order stats

* Add customer name to table instead of customer type

* Add customer total to segments

* Update tests for new stats

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2020-06-18 20:43:56 +03:00
Jeff Stieler 9794fed139 Disable task list on analytics dashboard when homepage is enabled. (https://github.com/woocommerce/woocommerce-admin/pull/4617)
Regression from 8a2750c973.
2020-06-18 10:56:30 -04:00
Bec Scott d36fdc01d7 Add Insight note (https://github.com/woocommerce/woocommerce-admin/pull/4516)
* Add Insight note

* Change actioned_label to actioned_text

* Move actioned text up a level

* Fix comment

* Rename insight class

* Add deny action to insight first sale and fix the button actions

* fix spacing

* Tweak conditions in the inbox card

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 11:28:27 +10:00
Paul Sealock 03db742cdd Currency package: make naming clearer (https://github.com/woocommerce/woocommerce-admin/pull/4560) 2020-06-18 11:33:40 +12:00
Jeff Stieler dd54268ad7 Master -> main. (https://github.com/woocommerce/woocommerce-admin/pull/4618) 2020-06-17 13:39:41 -04:00
Joshua T Flowers 21d65f4bc8 Add pre-launch checklist note on task list completion (https://github.com/woocommerce/woocommerce-admin/pull/4532) 2020-06-16 19:10:49 +03:00
Jeff Stieler f2c8f34d22 Add Tool to Clear/Invalidate Analytics Cache (https://github.com/woocommerce/woocommerce-admin/pull/4580)
* Add "clear cache" button to WooCommerce Tools page.

* Hook up cache clear tool button.

* Add success message to clear cache tool.
2020-06-16 09:47:58 -04:00
Jeff Stieler d591d77a53 Fix deleted products breaking Downloads Report (https://github.com/woocommerce/woocommerce-admin/pull/4582)
* Don't attempt order download information retrieval when the product has been deleted.

* Handle display of download names when product has been deleted.

* Add deleted product test case for download report endpoint.

* Fix date() usage in download report tests.
2020-06-16 09:47:27 -04:00
Jeff Stieler 3085680eb3 Fix column used to JOIN products to their categories. (https://github.com/woocommerce/woocommerce-admin/pull/4570)
Match term_id to category_id after JOINing through the term taxonomy table.
2020-06-16 09:42:54 -04:00
Timmy Crawford 204723caf5 Release 1.3.0-beta.1 (https://github.com/woocommerce/woocommerce-admin/pull/4587)
* Release 1.3.0-beta.1

* udpate changelog with '@'

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-06-16 19:58:24 +12:00
Jason Conroy 4cf586c4f1 Add Coupon feature (https://github.com/woocommerce/woocommerce-admin/pull/4526)
* Handle new object for posts and recommendations

* Set breadcrumb parent for woocommerce-coupons to be woocommerce-marketing

* Add main coupon wrapping component

* Render coupon wrapper element below coupon table using wp-admin-scripts

* Finish off implementing category param for data store resolvers

* Create a helper trait for legacy coupons

* Add coupon related titles and descriptions

* Add note for the coupons being moved

* Allow for querying by note name in the notes Data Store

* Revamp coupon moved trait

* Add the new note only if we don't have an unactioned note and perform a redirect to ensure menu updates

* set_icon is deprecated

* Move coupon menu, adding a note for customers

* Translate title and descriptions

* Whitespace

* Account for coupon functionality being disabled

* Hide legacy menu before redirect

* Don’t keep adding the note if customer dismisses it from inbox

* Move behind feature flag

* Add note if feature enabled

* Add filter to override coupon feature

* Tweak option name to refer to wc_admin

To help with finding etc.

* use css variables

* Add the new note only if we don't have an unactioned note

* Switch the filter logic so `false` turns off the feature

This is a bit more intuitive when utilizing the filter

* Remove extraneous string and add trailing new lines

* Use correct posts object in tests

* Revert accidental removal of where_types

* Add coupons category to RecommendedExtensions

* Use 1.1 api to get categorized recommendations

* Add missing text domains

* Fix menu handling to point to woocommerce-marketing

* Only load coupon scripts on the coupon page

* Rework marketing menu logic to register pages more properly

* Use correct wc-admin path for marketing page

* Remove separate feature flag

WC Admin has existing feature flags to load enable/disable the feature

* Only set the coupon parent to marketing when the feature is enabled

* Only load coupon feature if marketing feature is enabled

Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
Co-authored-by: Jeremy Pry <jeremy.pry@gmail.com>
2020-06-16 12:00:41 +09:30
Bec Scott 4a73d136de Onboarding profile rule processor (https://github.com/woocommerce/woocommerce-admin/pull/4498)
# Conflicts:
#	src/RemoteInboxNotifications/GetRuleProcessor.php

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-16 10:26:55 +10:00
Bec Scott e4bc71ffb8 Add product count rule (https://github.com/woocommerce/woocommerce-admin/pull/4334)
* Product count rule

# Conflicts:
#	src/RemoteInboxNotifications/GetRuleProcessor.php

# Conflicts:
#	src/RemoteInboxNotifications/GetRuleProcessor.php

* Use WC class to get products instead of a custom query

* Remove ProductsProvider

* Use total in product query

* Updates to suit parent branch

* Fixed return value

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-16 10:22:35 +10:00
Bec Scott e6a5866690 Add stored state between remote inbox notification runs (https://github.com/woocommerce/woocommerce-admin/pull/4260)
* Fix comment and convert if..elseif to switch

* Take out intermediate function

* make ProductsProvider a non-static class

* Adds RINDS data rule, and set up for woocommerce/woocommerce-admin#4223

# Conflicts:
#	src/RemoteInboxNotifications/EvaluateAndGetStatus.php

* Fix rebase issues

# Conflicts:
#	src/RemoteInboxNotifications/DataRuleProcessor.php

* Split product data setup out, use product query

# Conflicts:
#	src/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php

* Remove RINDS references

* Remove unused products provider

* Add validation to the data rule processor

* Fix some issues that were failing tests

* Remove unused var

* Make data setup for products return the data object

* Rework product query

* Rename $data to $stored_state

* Fix condition in query

* Add time after wcadmin activation rule (https://github.com/woocommerce/woocommerce-admin/pull/4337)

* Add wcadmin active for rule

# Conflicts:
#	src/RemoteInboxNotifications/GetRuleProcessor.php

* Use DAY_IN_SECONDS constant

* Fix logic error

* Fix test naming

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add order count rule (https://github.com/woocommerce/woocommerce-admin/pull/4335)

* Order count rule

# Conflicts:
#	src/RemoteInboxNotifications/GetRuleProcessor.php

* Use default provider

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Use correct 'return' value

* Move back to using a SQL query to get the product count

as the WC_Product_Query has issues during the product publish lifecycle. The product is initially published with a taxonomy term of uncategorized which isn't accepted by the query's filter.

* Change back to using WC_Product_Query, and do prelim init via admin_init action

* If there are no specs when running the engine, run the poller first then retry

* Fix some failing tests

* Don't perform init if we're feature toggled off

* Move feature check inside RIN engine class because the feature filter isn't ready during FeaturePlugin init

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-16 09:42:35 +10:00
Joshua T Flowers 59bb4e8dbe Add note on first order creation (https://github.com/woocommerce/woocommerce-admin/pull/4531)
* Add note on first order creation

* Add note when first order is created manually
2020-06-15 08:45:06 +03:00
Paul Sealock fea332b5b4 Change homepage to homesceen (https://github.com/woocommerce/woocommerce-admin/pull/4549) 2020-06-15 14:17:12 +12:00
Bec Scott 6ffe5cccf7 Add Home Screen Feedback admin note (https://github.com/woocommerce/woocommerce-admin/pull/4527)
* Add Home Screen Feedback admin note

* Fix the file comment

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 09:27:43 +10:00
Bec Scott 2579eb28c3 Add Need some inspiration admin note (https://github.com/woocommerce/woocommerce-admin/pull/4509)
* Add Need some inspiration admin note

* Fix action URL

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 09:23:50 +10:00
Jason Conroy 819e81677c Fix wc-admin registered page breadcrumb path (https://github.com/woocommerce/woocommerce-admin/pull/4563) 2020-06-13 07:25:43 +09:30
Daniel Bitzer ca517af7c0 Make it possible (far easier) to add menu items under 'Marketing' (https://github.com/woocommerce/woocommerce-admin/pull/4561)
* Make it possible to add marketing submenu pages

* Always set the parent value for marketing pages

* phpcs

* Add ‘overview’ to breadcrumb and path

* Fix permission check conditional

* Add parent menu at priority of 9, before other items are usually added

* Revert to use `/marketing` as the page path
2020-06-13 07:25:15 +09:30
Fernando 0fc1ec29fb Added new notification to choose a niche (https://github.com/woocommerce/woocommerce-admin/pull/4441)
* Added new notification to choose a niche

This commit adds a new notification to choose a niche

# Conflicts:
#	src/Events.php

* Bugfix: removed wrong validation

* Added validation for onboarding_profile

This commits adds a validation to confirm that the onboarding_profile is set.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-12 15:49:41 -03:00
Paul Dechov 1a98cd0dbc Task list: Add more Stripe supported countries (https://github.com/woocommerce/woocommerce-admin/pull/4545)
* Show Stripe task for recently supported countries

* Add Puerto Rico as supported 'country', included in US by Stripe

* Add preview country India to Stripe supported list
2020-06-12 14:03:47 -04:00
Joshua T Flowers 0f4d099b79 Add real time order alerts note for mobile app (https://github.com/woocommerce/woocommerce-admin/pull/4541)
* Add real time order alerts note for mobile app

* Fix typos
2020-06-12 11:01:06 +03:00
Jason Conroy 8f291d2ec3 Refactor marketing components to make more reusable. (https://github.com/woocommerce/woocommerce-admin/pull/4524)
* refactor slider component to be functional

* Refactor RecommendedExtensions

* Refactor KnowledgeBase

* Refactor API to account for component location changes and categories

* Fix missing param description

* Remove unnessary use

* Pass down the category of the received plugins.

* Store the recommended plugins for the different categories separately.

* Pass down the category.

* Add new functions to get by category.

* set categories

* Handle new object for posts and recommendations

* Update tests

* Finish off implementing category param for data store resolvers

* Update js tests

* Fix incorrect reference to kb component

Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
2020-06-12 16:47:17 +09:30
Joshua T Flowers 046f6c8bd4 Create action for installing and activate plugins (https://github.com/woocommerce/woocommerce-admin/pull/4473)
* Add installAndActivatePlugins method to plugin store

* Use new install/actiate method in Plugins component

* Refactor benefits page to use await

* Refactor business details page to use new install method

* Replace Plugins component in Jetpack CTA

* Format and throw errors in plugin data store

* Add generic response handling function

* Add default error messages to plugin API
2020-06-12 09:38:33 +03:00
Jason Conroy 2aa59bc8e6 Update hubspot-for-woocommerce extension info (https://github.com/woocommerce/woocommerce-admin/pull/4551) 2020-06-12 11:47:25 +09:30
Bec Scott b3692e8ec4 Add Learn more about Product Settings note (https://github.com/woocommerce/woocommerce-admin/pull/4515)
* Add Learn more about Product Settings note

* Fix logic around new merchants vs existing, fix product count

* Refactor to use admin_init action, use WC_Product_Query

* Don't try to count products when recording added product date

* Rename function

* Completely drop recording product add times and just use oldest product date instead

* Remove onboarding update check, checking the profile is sufficient

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-12 11:17:32 +10:00
Bec Scott 1b312186f6 Remove use welcome message statement (merge fail) (https://github.com/woocommerce/woocommerce-admin/pull/4550)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-11 09:09:51 -07:00
Bec Scott adce0b4dd1 Admin note for online clothing stores (https://github.com/woocommerce/woocommerce-admin/pull/4508)
* Admin note for online clothing stores

* Refactor identifying if the store is in the fashion industry

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-11 10:48:08 +10:00
Paul Sealock d7aec170f1 Runtime feature config override (https://github.com/woocommerce/woocommerce-admin/pull/4523) 2020-06-11 12:26:20 +12:00
Bec Scott 8854a71d9c Add First product admin note (https://github.com/woocommerce/woocommerce-admin/pull/4525)
* Add First product admin note

* Add "not setting up for client" rule

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-11 10:08:26 +10:00
Jeff Stieler 9be6bdd841 Fix loading of RTL styles in chunks. (https://github.com/woocommerce/woocommerce-admin/pull/4542) 2020-06-10 18:06:17 -05:00
Jeff Stieler 8a2750c973 Migrate user store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4505)
* Initial user preferences custom hook (wc meta).

* Organize dependencies.

* Specify dependencies in useSelect() call.

* Remove specifying preference keys.

There's currently no performance benefit to be had.

* Add HoC for hydrating current user data.

* Add user prefs update method.

* Export user prefs hook and HoC in data package.

* Handle error condition when updating user preferences.

* Use closure to get user ID for prefs update.

* Refactor analytics dashboard to use new user hook.

* Refactor ReportTable component to use new user hook.

* Move prop access to top of function component.

* Add todo for potential manual resolution logic.

* Refactor DashboardCharts component to use new user preferences hook.

* Move code out of functional component where possible.

* Fix chart interval query property.

* Refactor Leaderboards component to use new user preferences hook.

* Move code out of functional component where possible.

* Refactor Inbox panel to use user prefs hook.

@todo - updating last read isn't working.

* Use user prefs hook in StatsOverview component.

* Export user preferences store name.

* Use new store for unread inbox indicator.

* Hydrate current user data higher up in the app.

* Update "last read" timestamp in inbox panel.

* Fix StatsOverview test.

* Remove unused dispatch method from StorePerformance component.

* Remove now defunct user methods from wc-api spec.

* Add tests for isRequesting.

* JSON decode WC meta on updated user object.

* Test user prefs retrieval and save.

* Remove todo comment.

* Use user prefs hook in Jetpack install CTA on homepage.
2020-06-10 11:46:46 -05:00
Matt Sherman 369072b7df Inbox: Remove (duplicate) dismiss button on tracking opt-in note (https://github.com/woocommerce/woocommerce-admin/pull/4500)
* Do not add Dismiss button to tracking opt-in note
* Remove `tracking-dismiss` action from DB on upgrade
2020-06-10 10:16:56 -04:00
Fernando 289636abba Modified layout.js withSelect (https://github.com/woocommerce/woocommerce-admin/pull/4480)
* Changed some API responses

This commit adds changes to some API responses

* Changed "woocommerce_task_list_complete" loading in frontend

* Updated "$migrated_options" array

This commit updates "$migrated_options" array and adds a deletion control

* Changed "taskListComplete" in customizable.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:33:30 -03:00
Fernando d68c80ed15 Added new notification to ask about starting a dropshipping business. (https://github.com/woocommerce/woocommerce-admin/pull/4455)
* Added new notification to ask about starting a dropshipping business.

This commit adds a new notification to ask the client if they are considering starting a dropshipping business.

* Bugfix: corrected some problems in this note's logic

This commit adds a new validation for onboarding_profile, it removes an incorrect validation and changes the action's name

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:32:12 -03:00
Fernando e19d3cfbd4 Update version to 1.2.3 and adjust changelog (https://github.com/woocommerce/woocommerce-admin/pull/4435)
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:22:28 -03:00
Claudio Sanches 55a9bdbc11 Fixed missing 'items' in collection params (https://github.com/woocommerce/woocommerce-admin/pull/4484) 2020-06-09 15:35:31 -07:00
Jason Conroy 2f6decd15e Correctly set parent path when a wc-admin registered page is used as a breadcrumb parent (https://github.com/woocommerce/woocommerce-admin/pull/4490)
* Correct set parent path when wc-admin registered page is used as a breadcrumb parent

* Add some tests for PageController->get_breadcrumbs()

* Fix typos
2020-06-05 15:56:32 +09:30
Bec Scott a3ae3569c3 Remote inbox notification delivery (https://github.com/woocommerce/woocommerce-admin/pull/4143)
* Poll and persist specs

* Process specs into admin notes

* Add send at time rule processor

* Fix style issues

* Clear actions before recreating them to avoid dupes

* Trigger the RINDS engine when a plugin is activated

* Unit test SendAtTimeRuleProcessor

* Implement plugins activated rule processor

* Don't throw exception for unrecognised rule type. Also unit test around this.

* add url_is_action_query to tell whether to wrap the URL in wc_admin_url() call or not

* Add NOT rule

* revert change to install.php

* Drop unimplemented resend after dismissal rule

* Add OR rule

* Explicitly make "fail" a type of rule that can be applied to a spec

* Add plugin version rule processor

* Tidy up, don't need to pass $spec everywhere

* Remove meta record for action state - not really needed

* Move spec runner into it's own class, add some checks around re-unactioning a note

* Replace if..else with switch

* Just update the option

* Check that the JSON coming in is an array

* Change OR rule to accept an array of operands

* Add Pass rule processor

* Fix specs that are initially not published

* Rename send at rule to publish after

* Add publish before rule

* Remove unused interface

* Can't use PHP7's anonymous classes

* New notification: How to draw attention to your online store

* Add feature flag for rule-base inbox notes

* rename everything to RemoteInboxNotifications from RINDS

* Fix merge fail

* fix test

* Change preunactioned to pending

* Move feature flag check into Events.php

* Refactor reading a data source

* Rename poll_data_sources function

* Refactor EvaluateAndGetStatus::evaluate to take the rule evaluator directly

* Check that the response body exists

* Add validation and defensive checks

* Add rule processor interface

* Update note created time on status change

* Move non-test dependencies into processor constructors

* Update to proposed live URL

* Remove setting icon as it's being deprecated

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-05 11:51:25 +10:00
Bec Scott b4c735f0de Jetpack stats on home page (https://github.com/woocommerce/woocommerce-admin/pull/4481)
* Get Jetpack stats appearing on the home page

* Update hidden stats in stats overview test

* Make jetpack stats appear by default

* Add reportUrlType to dashboard store performance area

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-05 09:14:55 +10:00
Paul Sealock 7f8149563b Homescreen: Add option to disable (https://github.com/woocommerce/woocommerce-admin/pull/4450)
* Add homescreen option

* change opt name to homescreen
2020-06-04 08:42:30 +12:00
Fernando aefbafea9b Inbox notification: layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4218)
* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Add undo snackbar button after deletion (https://github.com/woocommerce/woocommerce-admin/pull/4281)

* Added undo snakbar button for a single note

# Conflicts:
#	client/wc-api/notes/mutations.js
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Notes.php

* Added a button to undo the deletion of all notes

# Conflicts:
#	client/wc-api/notes/operations.js
#	src/API/Notes.php

* Code adapted to make code reviewing easier

There was some code that also was present in another PR, that code was removed to make code reviewing easier.

* UnitTest added

This commit adds some unit tests

* Added verification for API response

* Added casting to $note_id

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

# Conflicts:
#	client/header/activity-panel/panels/inbox/card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Bugfix: solved problem when a note was undismissed

There was a problem with the undismiss functionality. When a note was undismissed, it always was recovered with "plain" layout. This commit solves this problem.

* Inbox notification: add event recording (https://github.com/woocommerce/woocommerce-admin/pull/4320)

* Added events recording

This commit adds events recording to the inbox notifications

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Added 'home_screen' verification

Changed recorded name, now when the client is in the WooCommerce 'home' page we record 'home_screen' instead of 'wc-admin'.

* Added a naming fix and a new prop to the recordEvent

* bugfix: added control before interaction with bodyNotificationRef

* Added more unit tests for new endpoints

This commit adds tests for deleting a single note and for deleting all the notes, both without permission.

* Modified variable name

* Refactor: prop rename and small logic change

* Screen name getter moved into the InboxNoteCard

This commit moves the screen name getter inside the InboxNoteCard.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Removed "screen" from state

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Refactor in admin-notes unit tests

Some unnecessary controls were removed from the admin-notes unit tests

* Indentation fixed in Install.php. Replaced spaces with tabs.

* Inbox notification: added new placeholder and empty card (https://github.com/woocommerce/woocommerce-admin/pull/4379)

* Added a new placeholder and an empty card

This commit adds a new placeholder and a new empty card to the inbox panel

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js
#	client/header/activity-panel/panels/inbox/style.scss

* Added border to read notes

* Improved note filtering in unreadNotes method and validNotes

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Actions render refactored

The actions render was refactored in InboxNoteCard component

* Refactor of InboxPanel component

The methods getUnreadNotesCount and hasValidNotes were separated from the InboxPanel component

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Refactor inbox panel subtitle classes

* Added changes for when a note is undismissed

This commit adds the requested changes in behavior and design for when a note is dismissed.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Bugfix: Added key to itemlist

The InboxNotePlaceholder is shown as an itemlist but it didn't have a key. This commit adds it.

* Removed unnecessary validation

* Refactored actionList map

This commit adds a refactor to the actionList map

* Changes to the getUndoDismissRequesting functionality

This commit adds a few changes to the getUndoDismissRequesting functionality

* Changed className prop

* Changed other className prop

* Modified InboxPanel rendering

* Removed unnecessary method in placeholder.js

* Simplified the card.js renderActions method

* Change renderActions return in card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: add client unit tests (https://github.com/woocommerce/woocommerce-admin/pull/4386)

* Added client unit tests

* Added test cases for getUnreadNotesCount and hasValidNotes

* Corrected typo error

* Removed Enzyme and added React Testing Library

* Removed unnecessary param

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Resolved some conflicts with master

* Marketing note test repaired

This commit repairs the marketing note test

* Added note type 'marketing' to delete all functionality

* Removed set_icon method from some notes and docs

* Added set_icon method as deprecated to prevent errors.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-06-03 08:43:35 -03:00
Joshua T Flowers 9149b0cce6 Add WooCommerce Subscriptions note (https://github.com/woocommerce/woocommerce-admin/pull/4451)
* Add WooCommerce Subscriptions note

* Update note type to marketing
2020-06-03 13:04:36 +03:00
Fernando fd020a2f4c Added new notification to ask about migrating from Shopify. (https://github.com/woocommerce/woocommerce-admin/pull/4465)
* Added new notification to ask about migrating from Shopify.

This commit adds a new notification to ask the client if they want to migrate from Shopify to WooCommerce.

* Modified action's name

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-05-31 11:52:30 -03:00
Joshua T Flowers f132e35c7b Add EU VAT extension note (https://github.com/woocommerce/woocommerce-admin/pull/4452)
* Add EU VAT extension note

* Add note types to default notes query
2020-05-28 11:52:25 +03:00
Joshua T Flowers 77992029da Add method to send WC profile data after profiler completion (https://github.com/woocommerce/woocommerce-admin/pull/4177)
* Add method to send WC profile data after profiler completion

* Send profiler data if complete on a newly connected site

* Check for put method existence before using the helper API

* Only send wc profile data if opted into tracking
2020-05-28 11:50:38 +03:00
Jeff Stieler cd146b388e Update TaskList design (https://github.com/woocommerce/woocommerce-admin/pull/4434)
* Update task list to closer match new designs.

* Update TaskList placeholder to match the new design.

* Hook up store details task click.

* Don't show "skip" prompt for task list on new home screen.

* Update time estimates for tasks.

* Add progress indicator to TaskList.

* Use null container for store details task.

* Fix progress bar styling.

* Just use card menu for TaskList dismissal.

* Don't show TaskList on analytics overview if homepage feature is enabled.

* Initial refactor of TaskList to use WP card.

* Style TaskList items and card header.

* Style "hide" button for TaskList.

* Don't show TaskList after it's completion.

* Don't show TaskList placeholder when options are still loading.

Avoid a potential flash of the placeholder without showing the TaskList.

* Fix border radius on progress bar.

* Fix TaskList header style with homepage feature disabled.

* Remove defunct function.

* Remove unnecessary import.

* Some minor color tweaks (https://github.com/woocommerce/woocommerce-admin/pull/4436)

* Colors

* Only show time estimation for incomplete tasks

* Don't show chevron on completed tasks.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>

* Preload task list completed option, show placeholder when loading.

* Fix alignment of "hide this" button.

Co-authored-by: James Koster <james@jameskoster.co.uk>
2020-05-27 10:08:39 -06:00
Joshua T Flowers 53dde217f6 Handle multiple plugin installs in a single request (https://github.com/woocommerce/woocommerce-admin/pull/4411)
* Allow plugins API to install multiple plugins at once

* Update wpdata to handle installing multiple plugins and errors

* Remove client-side error message switch

* Update plugin tests for multiple plugins param

* Update plugins API to WP standards

* Add error for non-allowed plugins instead of silently failing

* Allow error handling for individual plugins

* Fix up js tests for new API response

* Add installed plugin to response on successful install
2020-05-27 10:28:13 +03:00
Joshua T Flowers cbc96b0253 Refactor notes and conditions for adding notes (https://github.com/woocommerce/woocommerce-admin/pull/4340)
* Add note traits to check for existence and generic conditions

* Add new note type for marketing notes

* Delete marketing notes when opted out

* Add tests for marketing notes
2020-05-22 16:48:40 +03:00
Joshua T Flowers 3a88b6f980 Add setting to see if WcPay is configured (https://github.com/woocommerce/woocommerce-admin/pull/4145) 2020-05-22 13:40:10 +03:00
Daniel Bitzer c6371c32db Fix in app purchase back link for recommend marketing extensions card (https://github.com/woocommerce/woocommerce-admin/pull/4301)
* Add getInAppPurchaseUrl lib function

* Implement getInAppPurchaseUrl for marketing tab

* Include the directory with the wccom-site param

* use getInAppPurchaseUrl helper function in onboarding CartModal component

* Fix 'addQueryArgs' is defined but never used

* Fix Missing JSDoc @return description

* Make connectNonce setting a global setting rather than a marketing once

Co-authored-by: Jason Conroy <jason@findingsimple.com>
2020-05-20 15:03:58 +09:30
Paul Sealock 9b3b420e1a 1.2.2 version bump (https://github.com/woocommerce/woocommerce-admin/pull/4395)
* 1.2.2 changelog

* version bump 1.2.2

* tested up to 5.4.1
2020-05-20 12:24:33 +12:00
Timmy Crawford e6c13a4a02 Release: 1.2.0 (https://github.com/woocommerce/woocommerce-admin/pull/4328)
* Release: 1.2.0

* Updates per feedback.

* Get installed plugins from new plugin settings object. (https://github.com/woocommerce/woocommerce-admin/pull/4357)

* Bumping version numbers

* synch package-lock.json with master

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-05-15 12:30:02 -07:00
Claudio Sanches 392b69ee21 Fixed PHP notice about undefined index of items (https://github.com/woocommerce/woocommerce-admin/pull/4377)
Notice caused by the missing 'items' param required for 'array' types
2020-05-14 14:12:59 -06:00
Joshua T Flowers 6fd251bfe4 Adds Jetpack stats to performance indicator endpoints (https://github.com/woocommerce/woocommerce-admin/pull/4291)
* Move allowed report analytics data to separate function

* Add function to retrieve allowed Jetpack module endpoints

* Fix API urls

* Add number format as default for jetpack modules

* Add module permissions and format to array

* Add filter for returned data from performance indicators API

* Filter jetpack stats by queried dates

* Fix empty date query filtering

* Mock the Jetpack API response

* Add tests for Jetpack stats in allowed endpoints

* Add tests for filtering Jetpack stats based on time

* Add tests for default args
2020-05-13 14:52:32 +03:00
Bec Scott 5ae18fea04 Add back giving feedback note with some changes (https://github.com/woocommerce/woocommerce-admin/pull/4317)
* Add back giving feedback note with some changes

* Use unique name for new note

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-05-11 16:14:37 +10:00
Bec Scott 563a9deb68 New notification: How to draw attention to your online store (https://github.com/woocommerce/woocommerce-admin/pull/4318)
* New notification: How to draw attention to your online store

# Conflicts:
#	src/FeaturePlugin.php

* Get the option from the arguments

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-05-11 16:13:49 +10:00
Joshua T Flowers d08a788756 Only migrate options on version change (https://github.com/woocommerce/woocommerce-admin/pull/4324) 2020-05-08 15:26:46 -07:00
Joshua T Flowers dd8a625e90 Update wcadmin db version after db callback (https://github.com/woocommerce/woocommerce-admin/pull/4323) 2020-05-08 12:35:06 -07:00
Jason Conroy 1f0307e8b0 Fix/amazon plugin slug (https://github.com/woocommerce/woocommerce-admin/pull/4297)
* Use WCCOM plugin slug for amazon integration

* Use default create a ticket url
2020-05-08 11:09:39 +09:30
Jeff Stieler 4f48ae9fb7 Fix Dashboard flash before OBW chunk loads. (https://github.com/woocommerce/woocommerce-admin/pull/4259)
* Document the `woocommerce_admin_is_loading` filter.

* Prevent dashboard from being visible during ProfileWizard chunk load.

* Delay removing loading class rather than adding full screen class prematurely.
2020-05-06 06:56:23 -06:00
Matt Sherman f639d4a32e Remove obsolete inbox messages (https://github.com/woocommerce/woocommerce-admin/pull/4182)
* Remove welcome note
* Remove store notice setting note
* Remove review your experience note
* Add tests for delete_notes_with_name
* Add filter support so that other code can add notes to be deleted on upgrade.
2020-05-05 15:38:16 -04:00
Paul Sealock 3fc69b9739 Homepage: Add stats overview selection (https://github.com/woocommerce/woocommerce-admin/pull/4264)
* Homwpage: add stats overview stat toggle

* toggle stats

* fix

* tests

* better hook name

* clean up

* add back in Fragment

* remove extra prop

* better test name
2020-05-05 10:58:39 +12:00
Joshua T Flowers 53ee282331 Don't reschedule imports on failed imports (https://github.com/woocommerce/woocommerce-admin/pull/4263) 2020-05-04 14:55:33 +03:00
Joshua T Flowers 586760c561 Adds the onboarding payments note (https://github.com/woocommerce/woocommerce-admin/pull/4157)
* Save payment skipped and event timestamp to options

* Add payments note

* Convert payments task timestamp to seconds

* Skip payments note if skip timestamp is not set
2020-05-04 14:33:11 +03:00
Kʜᴀɴ 92d7b18b1b Use PAGE_ROOT to reduce redundancy (https://github.com/woocommerce/woocommerce-admin/pull/4238) 2020-05-01 09:56:54 +12:00
Timmy Crawford b07d69ddf8 Update version to 1.1.1 and adjust changelog (https://github.com/woocommerce/woocommerce-admin/pull/4242)
* Update version to 1.1.1 and adjust changelog

* Love that we have a test that caught this.
2020-04-30 10:57:05 -07:00
David Stone 8ebd33fe6b Use Route based code splitting to optimize bundle size (https://github.com/woocommerce/woocommerce-admin/pull/4094)
* Use lazy loading to split up the size of the js downloaded

* Use lazy loading to split up the size of the js downloaded

* Add Moment Timezone plugin to reduce size of data file.

* Lazy load header panels and use Dashicons for faster loading

* Load assets from the correct publicPath

* Load assets from the correct publicPath

* PHP cs fixes

* Fix missing quotes on string literal.

* Fix PropType warning for lazy loaded component.

* Separate the task list and dashboard chunks.

* Lazy load dashboard sections.

* Restore original icons and reduce size by importing only the icons needed

* Lazy load alerts to save more Kb on initial load

* Minify built JS in production mode.

* Add preload tags for WC Admin assets. (https://github.com/woocommerce/woocommerce-admin/pull/4162)

* Fix linting errors.

* Add modified UnminifiedWebpackPlugin.

* Produce minified and unminified bundles for all builds.

* Remove unused variable from webpack config.

* Run unminify after sourcemap generation.

* Only hook after optimization if we're using a devtool.

* Add minification suffix in Loader::get_url().

* Lazy load OBW on new home screen.

* Move OBW style up a level to layout.

* Hydrate ProfileWizard independently of withSelect and withDispatch

* Fix order of composition and fallback function when using hydration.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-04-29 12:01:27 -06:00
Joshua T Flowers ea2c2f7707 Fix sorting to push Storefront to the top of the theme list (https://github.com/woocommerce/woocommerce-admin/pull/4187)
* Fix sorting to push Storefront to the top of the theme list

* Add test to ensure Storefront is sorted in get_themes()

* copy paste cleanup

* Refactor sorting logic.

* Fix linting errors

* Updates per feedback.

* Add check for products property

* Fix for 5.6 CI.

* Oh hey another CI fix

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-04-28 14:47:05 -07:00
Chris Shultz 8fa6180dee Make sure woocommece-services is an allowed plugin on for shipping prompt. (https://github.com/woocommerce/woocommerce-admin/pull/4233) 2020-04-28 07:25:11 -07:00
Ron Rennick 5b201365dd POC store navigation (https://github.com/woocommerce/woocommerce-admin/pull/3202)
* Add base nav component

* Check if current screen is WC registered page

* Add core menu items

* Add param for menu items to migrate and hide old menu items

* Add body classes for wc navigation

* Check capability before adding menu items

* Add submenu items to frontend component

* Hide wc nav behind option

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2020-04-27 12:30:32 +03:00
Daniel Bitzer 16fdae3d06 Hide Marketing Tab Recomended Extensions card if marketing suggestions are disabled (https://github.com/woocommerce/woocommerce-admin/pull/4194)
* Add allowMarketplaceSuggestions to woocommerce_shared_settings

* Convert to functional component

* Hide ReccomendedExtensions card if opted out from marketing suggestions
2020-04-24 15:41:57 -07:00
Joshua T Flowers 320712fb2c Reset profiler when visiting old obw URL (https://github.com/woocommerce/woocommerce-admin/pull/4166) 2020-04-23 21:01:38 +03:00
Chris Shultz 65f7a0cf7d Remove A/B testing from order page shipping prompt. (https://github.com/woocommerce/woocommerce-admin/pull/4180) 2020-04-23 10:33:42 -07:00
Fernando 7dc87c0492 Changed email marketing note and the old filter was removed (https://github.com/woocommerce/woocommerce-admin/pull/4167)
* Changed email marketing note and the old filter was removed

The email marketing note was modified. Also, the old filter was removed.

* This note is not using NoteTraits anymore.

The NoteTraits reference was removed because the note is not using it anymore.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-22 18:40:19 -03:00
Paul Sealock 2f8ba63ec0 Homepage: Add Hello World, routing, and feature flag (https://github.com/woocommerce/woocommerce-admin/pull/4169)
* Homepage: Add hello world

* check feature flag

* homepage folder

* whitespace
2020-04-23 09:32:44 +12:00
Jeff Stieler 267c95e8d5 Reduce queries in Inbox Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3977)
* Notes panel: only request fields needed for render.

* Avoid retrieving post meta for WC_Admin_Note objects.

It's an ID collision anyhow.
2020-04-22 10:05:11 -06:00
Timmy Crawford 0e94da6160 Bump versions and revise changelog (https://github.com/woocommerce/woocommerce-admin/pull/4158) 2020-04-21 12:12:18 -07:00
Paul Sealock 28c85668fb Plugins: Move API out of Onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4093)
* Plugins DataStore: decouple from onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4048)

* Plugins DataStore: Add client side store

* change active_plugins to public static function

* don't change shape of allowed plugins
2020-04-20 14:04:13 +12:00
Daniel Bitzer bceb25ba0f Improve layout of Installed Extensions marketing card for tablet and mobile screens (https://github.com/woocommerce/woocommerce-admin/pull/4063)
* Set a max word length for the installed extension descriptions

* Improve InstalledExtensions layout for tablet and mobile

Mobile still needs work…

* Align product icon to top

* Tweak WelcomeCard mobile appearance

* Fix alignment
2020-04-17 11:27:22 -07:00
Paul Sealock c500d3fa98 Plugins DataStore: decouple from onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4048)
* Plugins DataStore: Add client side store
2020-04-17 11:58:36 +12:00
Daniel Bitzer ae526f7e1e Fix confusing UX when knowledge base card fails to retreive posts (https://github.com/woocommerce/woocommerce-admin/pull/4133)
* Use EmptyContent component when there are no knowledge base posts

* Reduce transient timeout to 15 mins when remote get fails

* Satisfy phpcs

* Satisfy jslint
2020-04-16 10:19:20 +09:30
Bec Scott 7f1481604c woocommerce/woocommerce-admin#3793 Tweak: Create admin note if Jetpack plugin doesn't get installed due to an error during OBW (https://github.com/woocommerce/woocommerce-admin/pull/3888)
* woocommerce/woocommerce-admin#3793 create admin note if Jetpack plugin doesn't work during OBW

* Move slug logic into the note creator class

* Also allow WooCommerce Services plugin when creating note

* rename possibly_add

* Rename note service class for jetpack/woocommerce services

* Remove (by actioning) notes when the Jetpack or WooCommerce Services plugins are activated

* Add todo around using a filter to make onboarding plugin API more generic

* Create admin note if activation fails

* Fix callback, don't know how that got through...

* Install from the note using a callback fn rather than redirecting back to the OBW

* Remove .orig file

* Move WC_Admin_Notes_Filters action hooks into WC_Admin_Notes_Install_Jetpack_And_WooCommerce_Services_Plugin

* Remove return values from plugin install function

* Simplify how plugin installation triggers actioning the note

* Use better icon in Jetpack/WooCommerce Services note

* Add space to note copy

* Shorten some names

* Only action the note if both plugins are activated

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-04-14 10:54:43 +10:00
Jeff Stieler cf2185eaaa Fix usage of WP_Error in non-global namespaces. (https://github.com/woocommerce/woocommerce-admin/pull/4115) 2020-04-13 08:33:22 -06:00
Jeff Stieler 9973e7e36f Handle orphaned order statuses in analytics settings. (https://github.com/woocommerce/woocommerce-admin/pull/4090)
* Add method to retrieve all synced order statuses.

* Determine what unregistered order statuses we have and add to client-side settings object.

* Stop filtering out unregistered statuses from analytics settings.

* Add unregistered statuses to analytics settings fields.
2020-04-10 08:42:03 -06:00
Fernando 866487ee27 Bugfix on payments step in CBD flow (https://github.com/woocommerce/woocommerce-admin/pull/4061)
* Bugfix on payments step in CBD flow

The `array_search` method was changed to `in_array`

* After pressing Connect a new tab opens with the Square webpage

* Updated behavior for non CBD Square payment connection

* Square option's name updated

* Replaced <p> tag with a <div> tag

Since there was a `validateDOMNesting` warning because we weren't adding only text inside a <p> tag, the `p` tag was changed to a `div`.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-08 16:17:32 -07:00
Jason Conroy fa873892dd Add missing prompts to installed extensions (https://github.com/woocommerce/woocommerce-admin/pull/4060)
* Add support for additional partner extensions to installed extensions

* Use correct variable name

* Add codisto support url

* Fix hubspot svg

- Fixes orange color as per brand guide
- Reduces file size from 120kb to 1kb

* Replace Google logo with vector SVG

* Fix AutomateWoo icon

* Fix Amazon Ebay svg icon

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-04-09 08:43:34 +09:30
Timmy Crawford acfae2c356 Setup Checklist: Remove Setup Menu Item and I'll Do This Later link (https://github.com/woocommerce/woocommerce-admin/pull/4085)
* Remove  menu item

* Remove 'do this later' link
2020-04-08 14:27:24 -07:00
Steve Grunwell 27704012a6 Enable the default homepage template to be filtered (https://github.com/woocommerce/woocommerce-admin/pull/4072)
This commit adds the "woocommerce_admin_onboarding_homepage_template" filter, enabling themes/plugins to filter the default homepage template created by the WooCommerce onboarding process.
2020-04-09 09:26:03 +12:00
Jason Conroy 05cf7b010e Marketing inbox note (https://github.com/woocommerce/woocommerce-admin/pull/4030)
* Add Marketing Note Provider Class

* Add marketing note intro to events

* Include Market Notes with feature plugin

* Change marketing into note title

* Remove facebook extension inbox note

* Remove onboarding completed (market my store) inbox note

* Add inline comment back in

* Remove constructor

Install method doesn’t exist

* Remove unnecessary use of WC_Admin_Notes_Marketing

* Change marketing hub note to use speaker gridicon

* Remove facebook note on update to 1.1.0
2020-04-09 05:55:59 +09:30
Ron Rennick cd9ee95c32 remove use of undefined QUEUE_GROUP (https://github.com/woocommerce/woocommerce-admin/pull/3994)
* remove use of undefined QUEUE_GROUP

* remove unsnooze action from both queue groups
2020-04-08 15:38:15 -03:00
Joshua T Flowers 94eec721c0 Fix double prefixed wcadmin events (https://github.com/woocommerce/woocommerce-admin/pull/4065) 2020-04-08 14:35:16 +03:00
Barry Hughes 801cd357a0 Cast to float, to avoid performing arithmetic with strings (https://github.com/woocommerce/woocommerce-admin/pull/4042) 2020-04-01 16:09:38 -03:00
Jason Conroy e78a4bc2db Update marketing hub recommended plugins API url. (https://github.com/woocommerce/woocommerce-admin/pull/4036)
* Update recommended plugins WCCOM url

* Remove todo.

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-04-01 08:37:01 -07:00
Matt Sherman 3037eb6f35 Show admin notices on embedded pages. (https://github.com/woocommerce/woocommerce-admin/pull/4019) 2020-03-31 19:38:42 -04:00
Jeff Stieler f8bc173cfb Only query requested stat totals in reports. (https://github.com/woocommerce/woocommerce-admin/pull/4009)
* Pass specified totals/intervals fields parameter to the Order Stats Query.

* Only request stats used in render for report summaries and charts.

Implement Orders as an example.

* Specify stats fields for all report requests.

* Add 'fields' parameter handling to all stats endpoint controllers.

* Reduce stats fields requested by dashboard charts.
2020-03-31 09:08:40 -06:00
Fernando 5242560972 Added hook to delete woocommerce_onboarding_homepage_post_id (https://github.com/woocommerce/woocommerce-admin/pull/4015)
* Added hook to delete woocommerce_onboarding_homepage_post_id

Added hook to delete woocommerce_onboarding_homepage_post_id when the homepage is deleted.

* Moved post type check further up in the method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-31 11:57:01 -03:00
Brent Shepherd 44af89a12e Add WooCommerce Payments Inbox note (https://github.com/woocommerce/woocommerce-admin/pull/4013)
* Add WC Pay to allowed plugins

* Add WC Pay Note to Inbox

* Don't update WC Pay note content

Actioned notes are hidden from the Inbox it turns out, so there's
no need to update the content to reflect that the WC Pay plugin
has been installed.

* Add WC pay note only after April 14

Instead of only adding the Install Now button in April. Only
add the note so that the Install now button is always available
and generally, the note is more useful and actionable because
the plugin is actually available.

* Fix WC Pay note install action

* Check if WC Pay is active or installed

Not just if the plugin files are available. This addresses both the
case where the plugin may be active an in a different folder name,
and where the plugin may have been installed but is not active,
likely because it's been deactivated.
2020-03-31 05:59:48 -07:00
Jason Conroy e5bd8f3184 Marketing Tab MVP (https://github.com/woocommerce/woocommerce-admin/pull/3953)
* Add Marketing feature flag

* Add marketing page and menu item

* Register marketing page with layout controller

* Add initial marketing cards

* Add max-width to marketing overview page

* Add initial marketing WelcomeCard component

* Make marketing welcome card permanently dismiss

* Add a readme for the marketing page components

* Record tracks event when marketing welcome dismissed

* Match design width

* Add welcome image and initial styles

* Use gridicon for close button

* Fix whitespace

* Add PluginsHelper::get_plugin_data()

* Add initial Marketing\InstalledExtensions class

* Preload installed marketing extensions data

* Tweak extension statuses

* Add InstalledExtensionRow component

* Add initial extension data to InstalledExtensions card

* Refactor PluginsHelper::get_plugin_data method

Using the new get_plugin_path_from_slug method

* Ensure get_plugins() function is available for PluginsHelper

* Simplify using PluginsHelper method

* Add MailChimp configured status logic

* Add links to InstalledExtensionRow component

* Add key prop to extensions list

* Setup styles for InstalledExtensions card

* Display nothing if no installed extensions

* Add InstalledExtensions::get_allowed_plugins()

* Setup Marketing Overview API controller

* Add /activate-plugin marketing endpoint

* Add more extensions URL props

* Add Facebook extension configured status logic

* Update Facebook extension URL props

* Fix extenion data logic

* Move component into it’s own directory

* Setup /marketing/overview/recommended endpoint

* Initial marketing page card header styles

* Add basic extension data to RecommendedExtensions

* Use color as variable

* Tweak card header padding for design

* Add basic styling to RecommendedExtensions card

* settingsUrl is not available if the plugin is not active

* Add /marketing/overview/installed-plugins REST endpoint

* Add basic activation functionality to InstalledExtensions component

* Don’t throw error on success

* Add MVP data store for installed extensions card

* Add core dark blue color variable

* Add styles for installed extensions card

* Move knowledge-base component to its own directory

* Pull recommended marketing plugins from remote test site

* Hide description when configured

As per design

* Tweak colors based on design

* Finish off styling for RecommendedExtensions

* Limit recommended extensions to 6 items

* Add error handling to RecommendedExtensions card

* Rename ‘copy’ extension prop

* Add marketing button component to match design

* Create ProductIcon component for marketing

* Add InstalledExtension icons

* Fix icon image paths

* Add ProductIcon to InstallExtensionRow

* Final styling to installed extensions card row

* Knowledge base card placeholders

* Fix missing icons when plugin not activated

* Remove logging

* Tweak array structure to ensure we have an array in JS

and not an object

* Refactor KnowledgeBase marketing component

- We don’t need loop through every post when rendering, just pick the posts we need
- Remove unused classes

* Move padding from each slide to the container

* Improve slider animations by absolute positioning the slides

* Reduce the slider animation timeout and add a note

* Add in-app purchase flow url params for recommended extensions

* Fix slider animation

* Reset slider height on window resize

* Short slider animation, fix double margin on smaller screens

* Add initial marketing/knowledge-base endpoint

* Pull knowledge base posts from API

* Rename welcome card dismiss tracks event

* Record event on recommended product click

* Recond onclick events for installed extensions card

* Record event when carousel navigation clicked

* img elements must have an alt prop

* Remove import that is never used

* use camelCase

* Decode HTML entities from API call

* Remove unused container div

* Add card loading state

* Add images to knowledge base card

* Link knowledge base posts

* Use the Pagination component rather than duplicate it’s functionality

* Clean up and rename knowledge base slider

* Clean knowledge base CSS and update responsive styles for single post slide

* Add a README for button component

* Add README for product icon component

* Add initial readme for Slider component

* Add correct image sizes to knowledge base slider, finalize styles

* Fix extension link urls

* Resolve some code formatting issue

* Bind class click methods to this

* Wrap nodes in Fragment

* Fix wccom-back path

* Add placeholder author and gravatar

Default avatar url size returned from the API is currently set to 96 so I’ve done a simple replace with 16

* Fix style-lint expected new line

* Add docblock for get_knowledge_base_posts()

* Setup data store for marketing to handle installedExtensions card

* Fix function names

“Activating” not “installing”

* Move welcome card component to its own dir

* IconButton component is going to be deprecated

ref: https://github.com/WordPress/gutenberg/pull/19299

* Support multiple activating plugins in the data store

* Rename extension to plugin for consistency

* Add propTypes to component

* Rename data-store/ to data/

* Fix import paths

* Extract isActivatingPlugin logic into datastore

* Move data store selectors into own file

* POST requests are not cached

* Export apiFetch action

* Don’t wrap API response in object

* Implement data store for recommended extensions

* Implement data store for marketing knowledge base

* Tidy getRecommendedPlugins resolver

* Try a cross browser cover/crop image effect to fit proposed design

And help fit longer titles in

* Add caught errors to handler

* Adjust positioning so watermater is displayed

* InstalledExtensions phpcs fixes

* Marketing phpcs fixes

* Alignment fix

* MarketingOverview phpcs fixes

* Missing full stop

* Update breadcrumbs to use new approach

* Fix style lint issues

* Record `marketing_knowledge_article` track event on knowledge base post click

* Import apiFetch and controls from @wordpress/data-controls

* Hex color to lowercase

* Remove duplicate method after rebase

* Use new showPageArrowsLabel rather than hide with CSS

* Fix blurry avatars on hidpi displays

* Hide avatar if URL is falsy

* Replace test author data with live data

* Combine conditionals into ternary

* Combine conditionals into ternary

* Simplify class column logic

* Only preload option and component settings in the admin

* Fix isActivatingPlugin not updating

Component was not re-rendeding.

* Use querySelector over getElementsByClassName

* Hide Marketing Welcome Card immediately on click

* Use create-a-ticket url for supportUrl and make that the default

* Add getInstalledPlugins resolver with preloaded data

* Revert "Add getInstalledPlugins resolver with preloaded data"

This reverts commit b8b127ec6411bef15616576b3bb189dc31777c13.

* Load plugin data in a separate request after activation

* Update welcome image

* Don’t return plugin data in the activation request.

* A space is required before closing bracket

* Update Jest config to gracefully handle static assets

Ref: https://jestjs.io/docs/en/webpack#handling-static-assets

* Remove unused onExit property

* Remove placeholder README

* Use prop directly

* yield createNotice

* Add note to indicate which Category

* Increase transient time to 3 days

* Use $gap-small

* Add proptype

* Add debounce to slider height resize listener

* Clean up isLoading logic

* Dont show image elements if image data is empty

* Open knowledge base posts in a new window

* Add “noreferrer”

* Turn the tab on in all env

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-03-28 06:48:27 -07:00
Allen Snook 078de3e9c0 Merge add/wc-pay to master, enabled for development only (https://github.com/woocommerce/woocommerce-admin/pull/4022)
* Add feature flag for wcpay (https://github.com/woocommerce/woocommerce-admin/pull/3958)

* Add card to payments task for WooCommerce Payments (https://github.com/woocommerce/woocommerce-admin/pull/3978)

* Add card to payments task for WooCommerce Payments

* Add missing plugin and settings PHP constants for woocommerce payments

* Add endpoint to return url to kick off wcpay

* Fix incorrect option name

* I can haz purple with white text, plz

* Linkify TOS, settings

* Recommend wcpay when visible; move wcpay to list top

* Test for wcpay feature flag

* Improved handling of feature flag

* If the user is an agency, include wcpay docs link on card

* Reverse agency logic, LOL

* Camel case fillRule etc

* Turn off wcpay for core and plugin for now
2020-03-27 16:24:32 -07:00
Jeff Stieler 85f5a7c927 Avoid making redundant requests for performance indicators. (https://github.com/woocommerce/woocommerce-admin/pull/3997) 2020-03-27 17:16:32 -06:00
Fernando Espinosa b71bc861fb WooCommerce Shipping order page prompt (https://github.com/woocommerce/woocommerce-admin/pull/3955)
Co-authored-by: David Stone <david@nnucomputerwhiz.com>
Co-authored-by: Chris Shultz <chris.shultz@automattic.com>
Co-authored-by: Harris Wong <harris.wong@a8c.com>
2020-03-27 13:42:58 -07:00
Jeff Stieler f13b9f334f Reduce queries in Orders Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3969)
* Allow on-demand retrieval of order line items in REST API.

* Orders Panel: reduce response fields from orders endpoint.
2020-03-27 13:01:19 -06:00
Jason Conroy d237256aa9 Abstract onboarding plugin code into a PluginsHelper class (https://github.com/woocommerce/woocommerce-admin/pull/3999)
* Abstract WP plugin code into a PluginsHelper class

We plan to use these methods in the Marketing tab.

* Add PluginsHelper::is_plugin_active()

* Add PluginsHelper::is_plugin_installed()

* Add PluginsHelper::get_plugin_data()

* Add PluginsHelper::get_plugin_path_from_slug()

* Refactor PluginsHelper::get_plugin_data method

Using the new get_plugin_path_from_slug method

* Refactor is_plugin_installed and is_plugin_active

Also adds support for plugin slugs or paths as parameters.

* Ensure get_plugins() function is available for PluginsHelper

* Ensure plugin path is a string before checking if installed/active

* PHPCS fixes

* Add initial unit tests for PluginsHelper

* Check plugin data array keys rather than all values

Will make it less fragile when Woo plugin data changes

* Fix typos

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-03-27 11:28:59 +10:30
Fernando 5264523d87 "Personalize your store" reminder: new inbox notification (https://github.com/woocommerce/woocommerce-admin/pull/3895)
* Added note to Personalize Store

Added note to Personalize Store, 5 days after registration or when the user completes the task list.

* Lint repeared

Lint error repeared.

* Moved homepage_id < 0 check to OnboardingTasks.php

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-26 17:07:54 -03:00
Jeff Stieler 9bbe5f1907 Verify coupon dates are DateTime instances before trying to format them. (https://github.com/woocommerce/woocommerce-admin/pull/3984) 2020-03-25 08:18:44 -06:00
Darren Ethier 783f613815 wp.data Settings refactor
add data store for settings using wp.data

add use-select-with-refresh example

replace fresh-data usage with new settings data store for settings page

Add data package

move to packages

Fix isDirty after save

Add isBusy to primary button when saving

update Readme

remove comment

readme to use useSelect

Revert "update Readme"

This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.

Data Layer: Settings page to use Settings store (https://github.com/woocommerce/woocommerce-admin/pull/3430)

* Data Layer: Settings store as source of truth for settings page

This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.

* fixup

* save on reset

* non mutable constants

* add set/getSettings

* save using setSettings

* separate HOC

* cleanup

* remove settingsToData

* withHydration

* remove withSettings HOC

* renmove useSettins for now

* withSettingsHydration updates

* Revert "withSettingsHydration updates"

This reverts commit f2adf108fbe19b574978fea5925a1a18e7ed3007.

* rename withSettingsHydration

* redo withSettingsHydration simplification

* restore

* useSettings

* render using useSettings

* handleInputChange working

* get setIsDirty working

* saving works

* reset and cleanup

* cleanup

* use snake case on hook files

* use clearIsDirty

* Avoid mutation on setting update

* remove @todo

* persiting -> isPersisting

* better reducer ternaries

* add wcSettings as arg to withSettingsHydration

reset package-lock

Settings: split out mutable wcAdminSettings (https://github.com/woocommerce/woocommerce-admin/pull/3675)

Settings: handle async settings groups (https://github.com/woocommerce/woocommerce-admin/pull/3707)
2020-03-25 16:20:17 +13:00
Jahidur Rahman Nadim 57f8cbf3e8 Fix undefined variable slug on theme activation error (https://github.com/woocommerce/woocommerce-admin/pull/3942) 2020-03-24 16:26:02 +13:00
Paul Sealock 6582975f98 Made the data store reading of content_data more resilient (https://github.com/woocommerce/woocommerce-admin/pull/3926) (https://github.com/woocommerce/woocommerce-admin/pull/3961)
Before 0.10.0 notes had a default content_data of array(). If stored in the database, these notes would be unable to be loaded. This adds some resiliency to the loading so that invalid content_data fields don't break WC_Admin_Note::set_content_data().

Co-authored-by: Christopher Allford <christopher.allford@automattic.com>
2020-03-24 13:10:33 +13:00
Bec Scott dd279a5cc1 Make WooCommerce breadcrumbs use WooCommerce branding if it is installed (https://github.com/woocommerce/woocommerce-admin/pull/3798)
* Make WooCommerce breadcrumbs use WooCommerce branding if it is installed

* Undo everything

* Whoops, add missing reverted code

* Push 'WooCommerce' out to breadcrumbs from the server except for where it is built up on the client

* Pass translated 'WooCommerce' down from the server to the front end

* Fix comment

* Use `admin_url` to build up the URL

Co-Authored-By: Ron Rennick <ron@ronandandrea.com>

* Use admin_url()

Co-Authored-By: Ron Rennick <ron@ronandandrea.com>

* Show WooCommerce breadcrumb on analytics pages

* Stop double appending the admin URL to the root WooCommerce breadcrumb url

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
2020-03-24 08:57:16 +10:00
Joshua T Flowers 1088a0ce8c Onboarding: Add task completion and task list completion tracks (https://github.com/woocommerce/woocommerce-admin/pull/3967)
* Refactor logic for showing dashboard reports and tasklist

* Check for complete option status instead of visible tasks in dashboard

* Update task list status on task list completion

* Track task completion event server-side on option add

* Add option to track previousdly completed events

* Track previously untracked tasks on option update
2020-03-23 13:47:12 -07:00
Joshua T Flowers 66e8525d89 Add WooCommerce support if store is using default theme (https://github.com/woocommerce/woocommerce-admin/pull/3908)
* Add WooCommerce support if store is using default theme

* Check if wc_is_wp_default_theme_active exists before calling it
2020-03-23 13:07:43 -07:00
Fernando cbf0405b95 Onboarding - payments task: filter payment gateways if the user selects CBD (https://github.com/woocommerce/woocommerce-admin/pull/3745)
* Added redirect for the specified conditions

Added redirect to "https://squareup.com/t/f_partnerships/d_referrals/p_woocommerce/c_general/o_none/l_us/dt_alldevice/pr_payments/?route=/solutions/cbd" for the specified conditions

* Added control for CBD payments gateways

Added control for CBD payments gateways. Now only Square is available for CBD

* Changed CBD industry control

* Added 'hasCbdIndustry' declaration in methods.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-20 15:33:18 -03:00
Jeff Stieler 9dbd45e1d7 Bump version and add changelog entries. (https://github.com/woocommerce/woocommerce-admin/pull/3945) 2020-03-19 13:05:58 -06:00
Ron Rennick 43a941ad16 remove replace_actionscheduler_store_class function (https://github.com/woocommerce/woocommerce-admin/pull/3936)
* remove replace_actionscheduler_store_class function from master

* remove AS store class file

* reuse variable

* Fix test helper queue action cancellation for AS 2.x.x.

* Remove WPPostStore logic from SchedulerTraits.

* Remove dead queue code from WC_Admin_Notes.

Missed in https://github.com/woocommerce/woocommerce-admin/pull/3662.

Co-authored-by: Paul Sealock <psealock@gmail.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-03-19 10:34:09 -06:00
Paul Sealock ee111539bd 🍒 pick 3851 and 3938 into master (https://github.com/woocommerce/woocommerce-admin/pull/3940)
* fix undefined const WC_ADMIN_VERSION_NUMBER when WP < 5.3 (https://github.com/woocommerce/woocommerce-admin/pull/3851)

* Fix calling protected has_satisfied_dependencies on outdated plugin (https://github.com/woocommerce/woocommerce-admin/pull/3938)

* Fix calling protected has_satisfied_dependencies on outdated plugin

* Update src/Package.php

Co-Authored-By: Ron Rennick <ron@ronandandrea.com>

Co-authored-by: Ron Rennick <ron@ronandandrea.com>

Co-authored-by: Ron Rennick <ron@ronandandrea.com>
2020-03-19 14:52:07 +13:00
Jeff Stieler 581e483890 Don't clear WCCOM note when clicking the action button. (https://github.com/woocommerce/woocommerce-admin/pull/3909) 2020-03-17 14:32:27 -06:00
Joshua T Flowers 8b667d2169 Onboarding: Add offline payment methods (https://github.com/woocommerce/woocommerce-admin/pull/3832)
* Add on Cash on Delivery method to payment methods

* Add direct bank transfer method

* Update enabled paymet methods in markConfigured

* Add missing bacs property

* Add bacs styling
2020-03-16 12:57:23 +01:00
Joshua T Flowers 6c4c8fb7c1 Onboarding: Add toggles to configured payments in task list (https://github.com/woocommerce/woocommerce-admin/pull/3801)
* Add isConfigured property to all payment methods

* Remove payment configuration checks from server side

* Add isEnabled flags to all payment methods

* Add payment method toggle methods

* Extract payment methods

* Fix update options selectors

* Add error handling for payment method updates

* Remove configured from saved option

* Add event when payment is toggled

* Check if payment option exists before checking config

* Only fetch PayPal connection URL when plugin is active

* Only fetch Stripe connection URL when plugin is active
2020-03-16 12:09:29 +01:00
Bec Scott b8aee0f93b Onboarding: business step: add Google Ads extension install (https://github.com/woocommerce/woocommerce-admin/pull/3725)
* Onboarding: business step: add Google Ads extension install

* Updated extension slug etc to match the extension

* Fix a couple of slugs that were missed

* Remove extra div that was breaking because of an unrelated change (reused class name)

Co-authored-by: Bec Scott <me@becdetat.com>
2020-03-16 16:12:30 +10:00
Joshua T Flowers da6f113d18 Onboarding: Update payments task flow (https://github.com/woocommerce/woocommerce-admin/pull/3782)
* Add new payment method cards

* Refactor payment methods

* Track payment configuration and completion client-side

* Record tasklist_payment_connect_method event in markConfigured

* Record event on payment setup

* Add recommended payment method ribbon

* Return to payments task even when previously configured
2020-03-15 22:45:19 +01:00
Timmy Crawford 7266042b79 Create database tables earlier - like core. (https://github.com/woocommerce/woocommerce-admin/pull/3899)
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-03-13 12:42:01 -06:00