Commit Graph

688 Commits

Author SHA1 Message Date
Fernando 3ffc2c32ec Fixed the Add First Product email note checks (https://github.com/woocommerce/woocommerce-admin/pull/6260)
* Added extra filters to note

This commit adds extra filters to email note.

* Fixed note image and css

This commit fixes a few things related to the note image, css and some checks

* Fixed css and note image replaced

* Added readme.txt

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-02-03 17:15:43 -03:00
Hsing-Yu Flowers 600c91a2cc Check current user's install plugin capability before rendering (https://github.com/woocommerce/woocommerce-admin/pull/6167)
* Use get_userdata instead REST API

* Check current user's install plugin capability before rendering

* Retrieve user data via the REST API
2021-02-03 14:19:15 -03:00
Fernando bc1f0699c2 Replaced method `woocommerce_get_page_id` with `wc_get_page_id` (https://github.com/woocommerce/woocommerce-admin/pull/6222)
This commit replaces method `woocommerce_get_page_id` with `wc_get_page_id` in Loader.php

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-01-29 09:44:38 -03:00
louwie17 d2ca866b26 Remove old debug code for connecting to Calypso / WordPress.com in help section (https://github.com/woocommerce/woocommerce-admin/pull/6097)
* Remove Calypso / WordPress.com help section, only shown in WP_Debug

* Add changelog

* Remove unused calypso tests actions
2021-01-28 13:32:06 -04:00
Hsing-Yu Flowers dda06be0bf Change siteUrl to shopUrl (https://github.com/woocommerce/woocommerce-admin/pull/6200)
* Add shop url

* Change siteUrl to shopUrl
2021-01-28 16:47:57 +10:00
Moon ef20b35826 Normalize installed WC Admin version when comparing. (https://github.com/woocommerce/woocommerce-admin/pull/6205) 2021-01-27 15:58:06 -08:00
Fernando 2ab28c977f Extended task list refactor (https://github.com/woocommerce/woocommerce-admin/pull/6081)
* Fixed hiding core task list

This commit fixes the hiding of the core task list

* Added tests

* Added fix to readme.txt

* Fixed readme.txt

* Added new test

* Hooks were fixed

* Refactored task lists handling

This commit refactors a few things related to the task lists handling

* Added tests

* Fixed task lists handling

* Fixed tests

* Renamed 'taskListHidden' to 'taskListsHidden'

* Added taskListsHidden util

* Fix completed tasks tracking infinite loop

This commit fixes the completed tasks tracking infinite loop (for multiple extended tasks)

* Refactored update check

* Hide task list if there aren't any visible tasks

* Fixed comment

* Fixed typo

* Renamed example method

* Fixed example extension

* Added tab to the extension example

* Fixed extended task list enabling option

* Added more tests

* Added PHP tests

* Fixed some comments

* Removed utils.js file

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-01-27 15:40:02 -03:00
Paul Sealock 84222b568b Navigation: Change default location and add Product category items (https://github.com/woocommerce/woocommerce-admin/pull/6179)
* add product submenu items

* better check

* extesnions section

* use add_plugin_item

* htmlspecialchars_decode better

* Manually add product_brand taxonomy

* Determine if migrated items are a taxonomy or post_type. If they are, register them.

* add in_array check to register post types and taxonomies

* register a taxonomy or post_type, but not both
2021-01-27 13:05:55 +13:00
louwie17 74b3eccbc9 Add option to create product by template (https://github.com/woocommerce/woocommerce-admin/pull/5892)
* Initial product template modal

* Add custom product template for the new-post route

* Add test, and code for making use of the insert_post action

* Added ProductTemplates Datastore to create template with REST api

* Add back variation method, deleted by accident

* Move product from template endpoint to OnboardingTasks class

* Fix lint errors

* Added tracks and template hooks

* Rename product create permission check function, for less confusion

* Remove duplicate recommended option

* Fix stylelint errors

* PHP tests for the product_from_template endpoint

* Fix onboarding php unit tests

* Write tests for client product template options

* Refactored list component, to use it as a radio control list

* Fix lint errors

* REmove assertion as it fails on the ci

* Add changelog

* Updating tests to make sure all product attribute taxonomies are removed

* Add more specific assertions for importing sample products test

* Update the sample products test

* Deconstruct item object, from PR suggestion

* Fix PHP errors, by updating the createProductFromTemplate call
2021-01-25 12:52:42 -04:00
Joshua T Flowers dfcca3385e Use settings tabs filter to get setting pages for nav (https://github.com/woocommerce/woocommerce-admin/pull/6116) 2021-01-22 14:54:34 -05:00
Moon b80b65bd46 Add a new note a day after adding the first product (https://github.com/woocommerce/woocommerce-admin/pull/6032)
* Add a new note a day after adding the first product
* Do not add note if store has been active for more than 14 days
2021-01-20 22:11:53 -08:00
Sam Seay 7041c3b2d3 Add the "Getting started in Ecommerce" inbox note (https://github.com/woocommerce/woocommerce-admin/pull/6086) 2021-01-21 16:13:23 +13:00
Joshua T Flowers 828ffc8a1a Fix WooCommerce mobile menu for new navigation (https://github.com/woocommerce/woocommerce-admin/pull/6096)
* Show the first WooCommerce item in WP menu on mobile

* Hide excluded menu items from WooCommerce wp menu
2021-01-20 19:26:54 -05:00
Joshua T Flowers c98e3ca343 Disable features on tracking opt out (https://github.com/woocommerce/woocommerce-admin/pull/6075)
* Separate features into Features class

* Fix Loader references

* Move option to TOGGLE_OPTION_NAME constant

* Disable features on tracking opt out

* Remove errant classes

* Create array of beta features in Features class

* Update method names for exists and enabled

* Only load enabled features client-side
2021-01-20 19:26:40 -05:00
Moon 716982adee Make sure current_page has path index (https://github.com/woocommerce/woocommerce-admin/pull/6114) 2021-01-20 16:22:33 -08:00
Ilyas Foo 0b06f09d6a Update store deprecation welcome modal support doc link (https://github.com/woocommerce/woocommerce-admin/pull/6094)
* Update support doc link

* Update readme.txt
2021-01-20 12:04:37 +08:00
Bec Scott 0fd35e9a35 Add remote inbox notifications contains comparison and fix product count rule (https://github.com/woocommerce/woocommerce-admin/pull/6073)
* add remote inbox notifications contains comparison and fix product count rule

* Use stored state instead of another option

* Add change log to readme

* add new_product_count to remote inbox notifications documentation

* ensure new_product_count exists
2021-01-19 17:14:51 +10:00
Sam Seay 2f1946b408 Update content and timing of NeedSomeInspiration.php. (https://github.com/woocommerce/woocommerce-admin/pull/6076) 2021-01-18 09:27:10 +13:00
Joshua T Flowers 24ccd6803b Add survey URL builder method (https://github.com/woocommerce/woocommerce-admin/pull/6066)
* Add survey class and URL builder method

* Use survey URL method in notes

* Pass survey URL to opt out modal

* Simplify source/query filter

* Move survey URL to constant
2021-01-15 09:54:26 -05:00
Bec Scott b606a6933e New note: manage activity from home screen (https://github.com/woocommerce/woocommerce-admin/pull/6072)
* New note: manage activity from home screen

* update readme and fix compared version

* tweak the newly installed action name
2021-01-15 11:34:00 +10:00
Moon 583e87f29a Add a new note about the variable product when the owner adds the fir… (https://github.com/woocommerce/woocommerce-admin/pull/6021)
* Add a new note about the variable product when the owner adds the first product
* Attempt to add a new note when a product gets published
* Change logic to check only post status and type
* Add tests cases
2021-01-14 15:33:22 -08:00
Paul Sealock 0bde0d5fea Version bump to 2.0.0-dev (https://github.com/woocommerce/woocommerce-admin/pull/6071)
* version bump to 1.10.0-dev

* use WP version 2.0.0
2021-01-15 09:21:47 +13:00
Ilyas Foo e8e791dc0b Fix for translation chunks not generated on plugin activation (https://github.com/woocommerce/woocommerce-admin/pull/6028)
* Fix for translation chunks not generated on plugin activation

* Add support for woocommerce_activated_plugin hook to work as embedded package

* Update readme.txt

* Make sure woocommerce/woocommerce-admin#5062 does not regress by adding checks before accessing files

* Consolidate duplicated codes
2021-01-14 13:22:12 +08:00
Sam Seay 94af45fef0 Update the content of the ChooseNiche note. (https://github.com/woocommerce/woocommerce-admin/pull/6048) 2021-01-14 10:38:45 +13:00
Joel Thiessen 1a45ae2c0d Restrict beta features to only those that have opted into tracking, adding modal for navigation feature (https://github.com/woocommerce/woocommerce-admin/pull/6054) 2021-01-13 11:43:45 -08:00
Fernando 513173a9d9 Add merchant email notifications (https://github.com/woocommerce/woocommerce-admin/pull/5922)
* Added MerchantEmailNotifications class

* Added new type and Events refactor

# Conflicts:
#	src/Events.php

* Added templates

* Refactored MerchantEmailNotifications and NotificationEmail

* Templates refactored

* Added email opening tracking endpoint

* Added templates handling

* Moved folder `MerchantEmailNotifications`

* Fixed template extensibility

* Fixed note `heading` check

* Added default type in `get_template_filename`

* Added tests

* Removed bypass

* Modified URL

* Added required noteTypes

* Added flag for functionallity

* Fixed plain link

* Fixed comment

* Turned email notifications on by default

This commit adds the code to turn email notifications on by default

* Fixed email styles

* Fixed typo

* Renamed method "possible_send" as "run"

* Removed unnecessary control

* Fixed another typo

* Renamed method as "get_notification_email_addresses"

* Refactored method "send_merchant_notification"

* Renamed plain-merchant-notification

* Fixed tests

* Merchant email notifications - Action triggering (https://github.com/woocommerce/woocommerce-admin/pull/5976)

* Added templates

# Conflicts:
#	includes/emails/plain-mechant-notification.php

# Conflicts:
#	includes/emails/html-merchant-notification.php

* Added note action triggering

This commit adds the note actions triggering

# Conflicts:
#	includes/emails/html-merchant-notification.php

* Fixed error handling

* Refactored "trigger_note_action" method

* Fixed actions url

* Fixed note URL

* Added external redirect

* Added image and html handling for email

* Fixed tests

* Fixed buttons style

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

* Add your first product: email notification (https://github.com/woocommerce/woocommerce-admin/pull/6024)

* Added AddFirstProduct note

# Conflicts:
#	src/Events.php

* Added "AddFirstProduct" email note

This commit adds the email note "AddFirstProduct"

* Fixed image

This commit removes the image img-product-light.svg to use a png instead. Otherwise, the gmail proxy would break the image

* Fixed readme.txt

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

* Added readme.txt

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-01-12 21:09:22 -03:00
Adrian Duffell 3f044e8118 Remove deprecated use of Jetpack in shipping label banner (https://github.com/woocommerce/woocommerce-admin/pull/5929) 2021-01-12 08:43:34 +08:00
Nick Korovaiko c376d501c7 Fix undefined variable when database does not have collation capability
* handle the unsupported collation case

* add an entry to readme.txt[Unreleased]

Co-authored-by: Nikolay Korovaiko <villedepommes@l-mhjo56y7ce.TheFacebook.com>
Co-authored-by: Nick Korovaiko <villedepommes@fb.com>
2021-01-11 08:05:09 +08:00
Bec Scott fe871be92d Add note for users coming from Calypso (https://github.com/woocommerce/woocommerce-admin/pull/6030)
* Add note for users coming from Calypso if the site has wpcomsh installed

* remove check for wpcomsh

* Add release note
2021-01-11 09:24:28 +10:00
Joshua T Flowers 6d3d81abba Add feature toggle and extensibility (https://github.com/woocommerce/woocommerce-admin/pull/6007)
* Make WCA features list extensible

* Add navigation feature toggle

* Don't add features section if no features exist

* Turn off nav feature in core

* Move update text to nav feature toggle
2021-01-08 10:28:23 -05:00
Bec Scott 3338c273c2 Add welcome modal when coming from Calypso (https://github.com/woocommerce/woocommerce-admin/pull/6004)
* Add welcome modal when coming from Calypso

* add to changelog

* do some important work for prettier

* udpated with final copy

* Add PR number to readme
2021-01-08 12:06:52 +10:00
Moon 50e0ff1599 Add a new note when the store is 3+ days old and product count is 0 (https://github.com/woocommerce/woocommerce-admin/pull/6019) 2021-01-07 17:10:07 -08:00
Joshua T Flowers 7884ae079f Update onboarding email marketing note title (https://github.com/woocommerce/woocommerce-admin/pull/5997) 2021-01-07 16:24:14 -05:00
Joshua T Flowers 24261198ad Show DrawAttention note after 3 days (https://github.com/woocommerce/woocommerce-admin/pull/5998) 2021-01-07 16:23:43 -05:00
Lee Willis 6c3f30a1de Fix undefined index error (https://github.com/woocommerce/woocommerce-admin/pull/5990)
Co-authored-by: Lee Willis <lee@ademti-software.co.uk>
2021-01-07 16:13:56 -05:00
Paul Sealock b1ed75aa11 version bump to 1.9.0-dev (https://github.com/woocommerce/woocommerce-admin/pull/5999) 2021-01-08 08:41:29 +13:00
Moon 058e222607 Add new note for the theme marketplace (https://github.com/woocommerce/woocommerce-admin/pull/6016)
* Add a new note for the theme marketplace
2021-01-06 22:49:29 -08:00
Moon ef4d8a0339 Update title and content (https://github.com/woocommerce/woocommerce-admin/pull/6003) 2021-01-06 22:42:26 -08:00
Moon 00289ddb91 Remove HomeScreenFeedback note (https://github.com/woocommerce/woocommerce-admin/pull/6014)
* Remove HomeScreenFeedback

* Add wc-admin-home-screen-feedback to the obsolete_notes list
2021-01-06 22:39:22 -08:00
Moon 285aaa9b44 Add new note for the first product and payment setup insight (https://github.com/woocommerce/woocommerce-admin/pull/6015)
* Add new note for the first product and payment setup insight

* Remove note from FeaturePlugin -- it is unncessary
2021-01-06 22:39:04 -08:00
Jeff Stieler 06767113e5 Fix task list toggle logic in help tab. (https://github.com/woocommerce/woocommerce-admin/pull/5975) 2021-01-07 14:10:27 +13:00
Joshua T Flowers e2e1429acd Add link to update WordPress when min version not met (https://github.com/woocommerce/woocommerce-admin/pull/5881)
* Add text to update WP if min version not met

* Add disabled class if needs update
2021-01-05 08:31:14 +13:00
Joshua T Flowers f3f6b31a49 Localize regional currency information for use during onboarding setup (https://github.com/woocommerce/woocommerce-admin/pull/5969)
* Provide localeInfo via wcSettings

* Provide currency symbols via wcSettings

* Use localized data to derive currency

* Decode entities and fix spaces after setting currency

* Determine currency by country instead of region

* Handle PR feedback

* Remove country info and symbol fallbacks
2021-01-04 13:04:58 -05:00
Ilyas Foo 71877be8dc Reverts work done in woocommerce/woocommerce-admin#4857 for automated shipping after OBW is completed (https://github.com/woocommerce/woocommerce-admin/pull/5971)
* Reverts work done in woocommerce/woocommerce-admin#4857 for automated shipping after OBW is completed

* Remove ReviewShippingSettings note

* Update readme.txt

* Add wc-admin-review-shipping-settings to delete note list
2021-01-01 15:30:28 +08:00
Jeff Stieler 4184392d33 Don't show Stock or Reviews panels before there are Products and/or Orders. (https://github.com/woocommerce/woocommerce-admin/pull/5973)
* Hide Stock and Reviews panels until there are products and/or orders.

* Add tests.

* Add to changelog.
2020-12-29 11:19:13 -05:00
Paul Sealock 80f641b849 Unbundle wp.components (https://github.com/woocommerce/woocommerce-admin/pull/5753)
* enqueue wp-components

* conditional check of Navigation?

* nav version checks, first pass

* better nav checking

* bump min requirments

* min versions

* Use WP 5.6 instead of 5.6.0

* add wp.date and wp.compose

* Handle missing FlexItem

* enqueue styles

* fix date range mobile dropdown
2020-12-21 14:57:55 +13:00
louwie17 cad707f57c Highlight help panel with tooltip (https://github.com/woocommerce/woocommerce-admin/pull/5826)
* Show highlight help panel popup after user enters uncompleted task more then once

* Updated styling of highlight tooltip

* Removed empty array from the useSelect to prevent unnecessary re-renders

* Updated styling of the highlight tooltip to match wireframe and wrote tests

* Fix close button location

* Add event tracking

* Add changelog

* Make use of user preferences meta data for task visit tracking

* Add support for toggling the show boolean

* Make sure the delay works correctly for highlight tooltip

* Continue tracking tasks visit count, and added onShow callback for tooltip
2020-12-18 09:17:07 -04:00
MILLER/F fbcc65034f Allow setting Jetpack connection when JETPACK_MASTER_USER isn't available (https://github.com/woocommerce/woocommerce-admin/pull/5880)
* Allow setting Jetpack connection when JETPACK_MASTER_USER isn't available

* Fix linting

* Fix lint

* Update OnboardingSetUpShipping.php

Added filter description
2020-12-17 20:49:18 +01:00
Jeff Stieler c8c544f70c Support custom product attributes in advanced filter (https://github.com/woocommerce/woocommerce-admin/pull/5848)
* Add product attributes autocomplete for Search control.

* Support single selection in Search component.

* Fix SelectControl input after selection in single mode.

* Remove label from Search component's inner SelectControl.

Placeholder is the behavior we want to avoid label and selection collision.

* Match Search component selected prop to SelectControl.

It's passed through anyhow.

* Rework attribute filter to use new endpoints for custom terms.

* Hook up custom attribute filter to report queries.

* Fix errant space in filter name.

* Fix SelectControl active status when control is disabled.

* Fix SelectControl "has tags" logic for non-multiple use cases.

* Fix attribute filter screen reader text.

* Update changelogs.

* Move custom attribute test to it's own function.

* Remove SelectControl input disabling.

This was supposed to improve keyboard behavior for non-multiple controls, but it was questionable.

* Fix backspace in attribute term field.
2020-12-17 09:59:01 -05:00
Joshua T Flowers 2068b36fe7 Add navigation opt out modal (https://github.com/woocommerce/woocommerce-admin/pull/5857)
* Add navigation opt out script

* Check to see if opted out before loading opt out scripts

* Include opt out styles

* Close modal after clicking 'Share Feedback'

* Update to not use export default
2020-12-16 09:08:14 -05:00
Joshua T Flowers 6e2bf974c7 Add filter for root back URL (https://github.com/woocommerce/woocommerce-admin/pull/5878)
* Add filter for root back URL

* Add filter for root back button label
2020-12-15 12:05:32 -05:00
Joshua T Flowers 2a7ac8e684 Register core product taxonomies (https://github.com/woocommerce/woocommerce-admin/pull/5811)
* Add product tags and categories taxonomies to menu

* Add product attributes page

* Register product taxonomies

* Register product attribute taxonomy screens

* Move order to taxonomy item getter

* Add match expressions for product tags and attributes

* Check against wc taxonomies instead of registering wc taxonomies

* Add comments to regex match groups

* Update nav readme to include taxonomies

* Update to less ambiguous taxonomy check
2020-12-14 17:58:03 -05:00
Jeff Stieler f5b243d073 Fix typo in Variation Stats Datastore context variable. (https://github.com/woocommerce/woocommerce-admin/pull/5874) 2020-12-15 09:28:13 +13:00
Jeff Stieler 1ce3fb1436 Add Product Attributes Endpoint (https://github.com/woocommerce/woocommerce-admin/pull/5840)
* Add new product attributes endpoint that allows searching.

Including custom attributes in the results.

* Add endpoint to fetch custom attribute values by slug.

* Add initial tests for Product Attributes endpoint.

* Test Product Attribute search.

* Fix schema/params for attribute terms endpoint.

* Add tests for custom term values endpoint.

* Add a LIMIT to the attributes query.

* Add endpoint to retrieve single attribute by slug.

Fixes the 'self' link.
2020-12-14 10:28:48 -05:00
Ilyas Foo 1ac787f568 fix: remove Historical Analytics Data notice woocommerce/woocommerce-admin#5286 (https://github.com/woocommerce/woocommerce-admin/pull/5725)
* fix: remove Historical Analytics Data notice woocommerce/woocommerce-admin#5286

* fix: removed reference for HistoricalData class elsewhere

* Remove Historical Data Alert facade (https://github.com/woocommerce/woocommerce-admin/pull/5725)
2020-12-14 18:02:40 +08:00
Fernando dc02c47499 Home Screen - Small refactor to tasks extensibility (https://github.com/woocommerce/woocommerce-admin/pull/5833)
* Added unregister extended task

This commit adds a method to unregister extended task when the plugin is deactivated

* Refactored task lists handling

This commit refactors the task lists handling

* Added default task type

This commit adds a default task type

* Fixed method comment

* Moved method to group objects to lib

This commit moves method to group objects to `lib`

* Refactored getUngroupedTasks method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-12-10 23:29:45 -03:00
louwie17 484e945460 Fix updating WC customer without wordpress user (if multiple orders are present) (https://github.com/woocommerce/woocommerce-admin/pull/5825)
* Create get last order function that does not rely on Wordpress user, and add test for use case

* Add change log

* Make sure tests use the right index for comparison

* Order by date_created_gmt first and order id second, and wrote test for get_last_order

* Fix test assertion, and remove unnecessary parameter
2020-12-10 09:42:17 -04:00
Joshua T Flowers 10b9579cde Add nav item route regex matching (https://github.com/woocommerce/woocommerce-admin/pull/5818)
* Use default expression to match items

* Pass match expression for WCA homepage

* Match post types if the current post type matches item

* Remove unused getParams

* Update tests for isMatch util

* Update nav docs

* Update default expression to match params in any order

* add query arg tests: additional and order

* Use match score based on regex matches

* Return max safe int for exact matches

* Update tests for match score

* more tests

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-12-09 13:45:30 +13:00
Bec Scott 0e7249c910 Add filter by variations in reports note (https://github.com/woocommerce/woocommerce-admin/pull/5208)
Authored-by: Rebecca Scott <me@becdetat.com>
2020-12-08 16:50:27 +13:00
Joel Thiessen 99b3396b50 Fix/5831 nav add plugin settings (https://github.com/woocommerce/woocommerce-admin/pull/5842)
* Adding simple add_plugin_setting_item() hook that enables adding a nav item only to the Settings menu

* Adding warning when a plugin attempts to register a settings item with illegal args

* rename to add_setting_item

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-12-08 16:32:10 +13:00
Moon bc6ba4f3ac Revert "Convert before and after dates to UTC (https://github.com/woocommerce/woocommerce-admin/pull/5819)" (https://github.com/woocommerce/woocommerce-admin/pull/5834)
This reverts commit c86563c3ac.
2020-12-07 16:01:22 -08:00
Moon c6df45c6c7 Add onboarding settings only for the home and setup wizard pages (https://github.com/woocommerce/woocommerce-admin/pull/5771)
* Add onboarding settings only if the current page is one of the WC admin pages.

* Uses screen object to detect WC Admin pages

* Removed unused variable

* Use PageController to check for the WC Admin pages -- it is more reliable

* Add onboarding settings only if the current page is home or setup wizard
2020-12-07 12:09:09 -08:00
Moon c86563c3ac Convert before and after dates to UTC (https://github.com/woocommerce/woocommerce-admin/pull/5819)
Fixes woocommerce/woocommerce-admin#5810
2020-12-07 11:53:06 +13:00
Adrian Duffell 300504ea94 Fix inconsistent customer Type parameter in REST endpoints (https://github.com/woocommerce/woocommerce-admin/pull/5823)
The wc-analytics/reports/orders and /wc-analytics/reports/orders/stats endpoints have inconsistent parameter names for filtering the customer type: customer_type vs customer.

This was affecting the Customer Type filter in the orders analytics, reported in issue woocommerce/woocommerce-admin#5803, where the component expects the parameter names to be the same. This is because it uses a parameter name based on the key in the filter configuration (customer_type).

To resolve this, this PR updates /wc-analytics/reports/orders/stats to accept both customer_type and customer as parameter names for this filter. The customer parameter has however been deprecated in its description to discourage usage.

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-12-07 06:39:29 +08:00
Jeff Stieler a476445788 Fix Orders Report Product/Variation Exclusion Filters (https://github.com/woocommerce/woocommerce-admin/pull/5822)
* Add aliases to product lookup table joins in the orders report.

Fixes issues with stacking product-type filters.

* Fix orders report product/variation exclusion filters.

Using "anti join" query strategy.

* Add changelog.

* Add test for product exclusion filter.
2020-12-04 11:33:58 -05:00
Fernando 91bf42d7f4 Home Screen - modified tasks extensibility (https://github.com/woocommerce/woocommerce-admin/pull/5794)
* Added tasks extensibility

This commit addes tasks extensibility

* Fixed tests

This commit fixes the tests

* Fixed add task example

This commit fixes the add task example

* Fixed method possiblyCompleteTaskList

This commit fixes the method "possiblyCompleteTaskList"

* Fixed method getIncompleteTasks

This commit fixes the method getIncompleteTasks

* Fixed add task example

* Added callback onDismiss

This commit adds the callback for the "onDismiss"

* Added onDismiss and isDismissable to add task example

This commit adds the props "onDismiss" and "isDismissable" to add task example

* Not showing extensions task list if empty

* Fixed onDismiss callback

* Add changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-12-03 17:16:04 -04:00
Bec Scott cf77e8040b Use error_log() to log the deprecated class calls instead of _deprecated_function() (https://github.com/woocommerce/woocommerce-admin/pull/5802)
* Use error_log() to log the deprecated class calls instead of _deprecated_function()

* Include method name and replacement in deprecation log message.

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-12-03 12:15:01 -08:00
Joshua T Flowers 71f718f875 Use callback for customers URL in navigation (https://github.com/woocommerce/woocommerce-admin/pull/5799) 2020-12-03 10:51:47 -05:00
Joshua T Flowers c659d2a729 Fix nav group titles showing in child menus (https://github.com/woocommerce/woocommerce-admin/pull/5793) 2020-12-03 10:50:38 -05:00
louwie17 e09f7d623e Update customer data on order update (https://github.com/woocommerce/woocommerce-admin/pull/5776)
* Add sync order customer to scheduler to update customer info on order update

* Write tests for syncing customer data from order
2020-12-03 08:55:27 -04:00
Moon 82ae70e910 Skip checking WooCommerce support if stylesheet does not exist (https://github.com/woocommerce/woocommerce-admin/pull/5783) 2020-12-02 15:38:07 -08:00
Paul Sealock 9bdd0ab8db Navigation: Introduce wc-admin registration client side navArgs (https://github.com/woocommerce/woocommerce-admin/pull/5773)
* Introduce clientside navArgs

* remove null in customners

* Update readme

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

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2020-12-03 11:56:24 +13:00
Joshua T Flowers 5ba669a2f4 Only show menu items from same parent menu (https://github.com/woocommerce/woocommerce-admin/pull/5731)
* Only render nav items belonging to parent menu ID

* Set item menu ID for items automatically

* Use categories map to filter items early

* Convert categorized menus to objects

* Prevent bypassing menu via existing parent

* Fix plugins name
2020-12-02 09:36:35 -05:00
Bec Scott d41a550246 Fix small issues with customer effort score package (https://github.com/woocommerce/woocommerce-admin/pull/5754)
* Add package dependencies and bump version

* don't use lodash's noop

* Use useEffect instead of changing state right in the render :-O

* Add dependencies for ces to Loader.php

* undo add dependencies for ces to Loader.php

* 🎶 found a typo

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-12-02 08:36:13 +10:00
Jeff Stieler de6d0d2c05 Add Razorpay to payment task for stores in India (https://github.com/woocommerce/woocommerce-admin/pull/5775)
* Display Razorpay for stores in India.

* Add Razorpay setup component.

* Remove composition with HoCs.

Refactor to use useSelect() and useDispatch() instead.

* Tweak useSelect() call.
2020-12-01 17:10:57 -05:00
Joshua T Flowers 4e29944b6c Allow WCA registered pages to register plugin items and categories (https://github.com/woocommerce/woocommerce-admin/pull/5717)
* Allow WCA registered pages to register plugin items and categories

* Don't allow top-level item registration through WCA

* Remove is_top_level from menu API

* Prevent directly setting woocommerce as parent ID
2020-12-01 10:22:00 -05:00
Jeff Stieler e1a77c6754 Allow actionable statuses in orders endpoint(s) filters. (https://github.com/woocommerce/woocommerce-admin/pull/5733) 2020-11-30 10:11:49 -05:00
Bec Scott cc5e500085 Fix/some outstanding CES bugs (https://github.com/woocommerce/woocommerce-admin/pull/5739)
* fix settings change enqueue params

* Include comments in score record callback

* send empty string for comments

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-26 10:25:09 +10:00
Jeff Stieler 2a302603c6 Migrate Stock Panel to Homescreen (https://github.com/woocommerce/woocommerce-admin/pull/5729)
* Refactor low stock variable to be the count instead of a boolean.

* Add initial render of the Stock panel on the homescreen.

* Move existing Stock panel to homescreen accordion.

* Ensure int value for low stock product count.

* Update ProductImage styling.

* Update stock activity car styles.

* Only show 5 low stock products.

* Add "undo" action to the stock updated snackbar.

* Fix check for explicit notice dismissal when taking actions.

* Hide now-in-stock products after updating.

By cllearing "edited" flag on successful update.

* Fetch more products after updating stock.

* Fix the number of product placeholders shown.

* Only show products placeholders on the initial fetch.

* Fix placeholder style.

* Fetch low stock count dynamically.

* Let initialOpen prop toggle Accordion panels if they haven't been toggled by the user.

* Refactor item total count state.

Allows for auto-updating item totals whenever identical queries (from a totals perspective) are issued.

* Add last order date to low stock products API response.

* Allow non-date strings in ActivityCard date prop.

* Add last order date to stock panel cards.

* Remove empty stock panel view.

* Add test file for StockPanel.

* Only request necessary fields from products endpoint.

* Add test for products fetch after stock update.

* Fix field name.

* Add test for last order date in low stock products API response.

* Stock panel should be initially closed.

* Skip updating a product if the quantity is unchanged.
2020-11-25 13:51:15 -05:00
Paul Sealock ee3968a7c2 add error_log for duplicate ids 2020-11-25 13:24:33 +13:00
Paul Sealock 10cf960b01 make post type ids unique 2020-11-25 13:24:33 +13:00
Paul Sealock 08edf9502e exclude base wc-settings 2020-11-25 13:24:33 +13:00
Paul Sealock aa4ed07af9 make ids unique 2020-11-25 13:24:33 +13:00
Paul Sealock 9783a4c764 homescreen id 2020-11-25 13:24:33 +13:00
Paul Sealock 861bcbc21c more unique ids 2020-11-25 13:24:33 +13:00
Paul Sealock 9c8d8c537e Make ids more unique 2020-11-25 13:24:33 +13:00
Paul Sealock 822efd30b0 Use paths as screen ids 2020-11-25 13:24:33 +13:00
Sam Seay d43e45576d Revert the smart tax defaults work of woocommerce/woocommerce-admin#4594. (https://github.com/woocommerce/woocommerce-admin/pull/5720) 2020-11-25 08:36:04 +13:00
Paul Sealock bbbc945b3e Fix wc-nav dependencies 2020-11-25 08:08:23 +13:00
Joshua T Flowers 91ac789393 Clean up menu callback methods (https://github.com/woocommerce/woocommerce-admin/pull/5679)
* Refactor menu item callback check

* Migrate parent items that have first child item migrated

* Allow wp menu items to be hidden with public method

* Rename hide menu item method
2020-11-23 14:01:53 -05:00
Jeff Stieler 479eb2c850 Don't show the Orders panel on the homescreen with the Task List (https://github.com/woocommerce/woocommerce-admin/pull/5552)
* Add order count to shared component settings.

* Hide the Orders panel when the store has no orders.

* Check for all order statuses except drafts from the checkout block.
2020-11-23 10:06:55 -05:00
Adrian Duffell 6a873ad470 Update Customer Effort Score to ignore tasks performed on mobile (https://github.com/woocommerce/woocommerce-admin/pull/5672)
* Update Customer Effort Score to only ask feedback from desktop users

* Add test for mobile disabling

* Update documentation

* Fix broken test

Instantiation of `CustomerEffortScoreTracks` was moved to the individual tests because it has the side effects of adding hooks in the constructor.
2020-11-23 06:26:24 +08:00
Joshua T Flowers e47d4a3bf7 Update core menu item order in navigation (https://github.com/woocommerce/woocommerce-admin/pull/5698) 2020-11-20 12:37:33 -05:00
Moon 30cfb76e2e Prevent adding duplicate queue item by checking action and label values (https://github.com/woocommerce/woocommerce-admin/pull/5682)
* Prevent adding duplicate queue item by checking action and label values
2020-11-18 16:30:22 -08:00
Joel Thiessen 4e5fa5cee9 Hiding primary tabs on Settings within WooCommerce since it's redundant with items in nav (https://github.com/woocommerce/woocommerce-admin/pull/5630)
* Hiding tabs displayed on wc-status pages as well
2020-11-18 15:54:24 -08:00
Sam Seay ebddffb8e8 Post 1.7.0 beta release chores (https://github.com/woocommerce/woocommerce-admin/pull/5558)
* Bump versions to 1.8.0-dev
* Update changelog for 1.7.0
2020-11-19 08:36:45 +13:00
Matt Sherman efc5dbb68d Show CES survey after editing an order (https://github.com/woocommerce/woocommerce-admin/pull/5540)
* Add enqueing of CES survey for shop order editing
* Only hook up transition_post_status if on edit page
2020-11-17 17:23:15 -05:00
Sam Seay 625dbe0ae5 Fix a bug where wc-tracks was not loaded as a dependency. (https://github.com/woocommerce/woocommerce-admin/pull/5645)
Fixes woocommerce/woocommerce-admin#5644
2020-11-17 13:55:08 +13:00
Jeff Stieler dc0f3b70f3 Fix classnames in mobile app inbox notes. (https://github.com/woocommerce/woocommerce-admin/pull/5641)
Missed in https://github.com/woocommerce/woocommerce-admin/pull/5462.
2020-11-16 16:39:36 -05:00
louwie17 43e7a5e5ca Add logic to skip WC Payment plugin note if not part of the onboarding business extension list (https://github.com/woocommerce/woocommerce-admin/pull/5619) 2020-11-13 15:56:39 -04:00