Commit Graph

493 Commits

Author SHA1 Message Date
Jeff Stieler 3bfc53c9cf Reintroduce the customer lookup init to report regeneration.
With the new date range and “skip existing” logic.
2019-04-30 09:17:12 -06:00
Jeff Stieler e350cfc898 Remove strict comparison from “is valid customer” logic.
Needed for the function to work in scheduled actions.
2019-04-30 09:09:35 -06:00
Joshua Flowers eecedfdba8 Set orders date to midnight before if days is set 2019-04-17 15:57:51 +08:00
Joshua Flowers 44e8c56d88 Run count query early to maybe skip order id query 2019-04-17 15:50:46 +08:00
Joshua Flowers fcf0994276 Fix missing batch action arguments 2019-04-12 16:50:43 +08:00
Joshua Flowers f213f5cb66 Make customer name empty string by default instead of null 2019-04-12 16:50:43 +08:00
Joshua Flowers 0a42757628 Process customer during order update instead of pre-processing all 2019-04-12 16:50:42 +08:00
Joshua Flowers 780c9da3d2 Hook up regenerate UI setting to new import endpoint 2019-04-12 16:50:42 +08:00
Joshua Flowers 1f016b5418 Add days and skip options to regenerate reports function 2019-04-12 16:50:42 +08:00
Joshua Flowers 4180b48346 Add reports import controller and endpoint 2019-04-12 16:50:42 +08:00
Justin Shreve 7fc70157c9 WC_Admin_Loader/PHP Refactor + Method to publish core ready features (https://github.com/woocommerce/woocommerce-admin/pull/1863)
* Try: Setup plugin to publish core library on npm

* Documentation clean up.

* Handle PR Feedback: Fix notices from happening in WC Core from API usage, fix sidebar dashboard ordering in menu, remove preload function check since we are supporting WP 5+, add a filter for preloading data and move usage to respective feature code, move features to a specific folder for bundiling, fix script translations.

* Fix code comment on analytics preload

* Continue refactoring code, and make it possible to launch 'embedded' features via the process as well.

* Fix note hook

* Fix note load order

* Address PR feedback: Fix class name, load leaderboard endpoint

* Remove example code prior to merge
2019-04-11 14:31:31 -04:00
Joshua T Flowers eb0b137020 Hook up leaderboards endpoint to dashboard (https://github.com/woocommerce/woocommerce-admin/pull/2004)
* Add allowed leaderboards endpoint to prefetch list

* Hook up leadboards endpoint to dashboard

* Skip data fetch for leaderboard if per page is less than 1

* Add tests to check for rendered html display
2019-04-11 10:53:05 +08:00
Jeff Stieler 4b2ac14994 Merge pull request woocommerce/woocommerce-admin#2015 from woocommerce/notes-queue-group
add WCA queue group to the unsnooze notes scheduled action
2019-04-10 10:21:39 -06:00
Justin Shreve 4727417746 Add a mobile app note (https://github.com/woocommerce/woocommerce-admin/pull/2008) 2019-04-10 11:49:02 -04:00
Albert Juhé Lluveras 5ae9ee65b0 PHP Lint fixes (https://github.com/woocommerce/woocommerce-admin/pull/2023) 2019-04-10 10:49:00 +02:00
Joshua T Flowers e31be343e2 Make customer name extendable (https://github.com/woocommerce/woocommerce-admin/pull/1976)
* Make customer name extendable

* Update get_customer_name to favor user profile information

* Update customer name on profile update

* Add tests around customer name getting and setting

* Prefix customer name filter with woocommerce_reports_
2019-04-09 11:39:39 +08:00
Joshua T Flowers f682fe76be Add leaderboard controller and endpoint (https://github.com/woocommerce/woocommerce-admin/pull/1995)
* Add leaderboard controller and endpoint

* Add existing leaderboard stats to leaderboard endpoint

* Add persisted query to leaderboard params

* Add leaderboard endpoint tests

* Check if extended_info params are set before assigning

* Change number param input format to mixed inside wc_admin_number_format
2019-04-09 11:34:56 +08:00
Jeff Stieler 2ec3e9843a Merge pull request woocommerce/woocommerce-admin#1872 from woocommerce/add/1831-order-milestone-notifications
Add order milestone notifications.
2019-04-08 16:04:07 -06:00
Jeff Stieler f734f01598 Clear recurring order milestones event on plugin deactivation. 2019-04-08 13:10:39 -06:00
Ron Rennick 870f7ddfcf add WCA queue group to the unsnooze notes scheduled action 2019-04-08 16:04:56 -03:00
Joshua T Flowers 753780bf7b Onboarding: Add levels REST API (https://github.com/woocommerce/woocommerce-admin/pull/1938)
* Add levels rest controller

* Add default levels

* Add onboarding level API tests

* Drop all since tags

* Make pre-response levels array associative for easier formatting

* Fix level tests for associative array
2019-04-05 10:35:30 +08:00
Ron Rennick 14d0d24762 phpcs lint fixes for /data-stores/ folder 2019-04-03 16:19:43 -03:00
Joshua T Flowers 0c5c1c3db4 Remove coupon_total from order stats table (https://github.com/woocommerce/woocommerce-admin/pull/1975)
* Remove coupons_total from order stats table

* Replace discount amount with coupon objects in stat tests
2019-04-03 09:37:17 +08:00
Ron Rennick c061bfd925 Merge pull request woocommerce/woocommerce-admin#1977 from woocommerce/fix/1783
lookup product title in order meta if product has been deleted
2019-04-02 16:13:47 -03:00
Ron Rennick 1d0e78e626 code alignment for linter 2019-04-02 15:20:23 -03:00
Jeff Stieler 6f2c11270b Clear cache when checking order count for the first two milestones. 2019-04-02 08:35:28 -06:00
Jeff Stieler e6e905919d Fix conditional for hooking the first two milestones action. 2019-04-02 08:34:22 -06:00
Ron Rennick 3a8ddbe3aa lookup product title in order meta if product has been deleted 2019-04-02 09:24:52 -03:00
Joshua T Flowers b03362da68 Cast order totals as floats when calculating net total (https://github.com/woocommerce/woocommerce-admin/pull/1945) 2019-04-02 13:43:12 +08:00
Jeff Stieler 632e4fd09d Add filter for order milestone statuses. 2019-04-01 16:37:55 -06:00
Jeff Stieler b9e02d0b61 Change 100+ order milestone message and CTA. 2019-04-01 16:37:54 -06:00
Jeff Stieler f610223708 Check for new order milestones every hour.
Only show one notification at a time.
2019-04-01 16:37:54 -06:00
Jeff Stieler 0893198f37 Add more orders count milestone notifications.
Also avoid notifications for thresholds passed before the plugin was activated.
2019-04-01 16:37:53 -06:00
Jeff Stieler e5a4a45ae5 Add milestone note for the store’s first 10 orders. 2019-04-01 16:37:53 -06:00
Jeff Stieler a31d0114cb Add first order milestone notification. 2019-04-01 16:37:53 -06:00
Jeff Stieler 57957633f4 Fix WC_Admin_Note default content data.
Arrays get serialized differently and object is required for successful retrieval.
2019-04-01 16:32:38 -06:00
Ron Rennick f730a8ec5d Only check for unsnooze note scheduled action in admin_init 2019-04-01 11:31:28 -03:00
Albert Juhé Lluveras 17141cd4d8 Update Variations controller filter names (https://github.com/woocommerce/woocommerce-admin/pull/1949) 2019-04-01 10:09:53 +02:00
Albert Juhé Lluveras 458f3ed065 Fix SKU sorting in the Variations report when a comparison is active (https://github.com/woocommerce/woocommerce-admin/pull/1952)
* make is sortable true.

* Variations endpoint: Fix sorting by SKU when there is an active comparison

* Cleanup

* Extract FROM parameter logic to 'get_from_sql_params'

* Remove unnecessary 'get_order_by_sql_params' from Products and Variations data stores
2019-04-01 10:09:45 +02:00
Joshua T Flowers 9c3faea12f Refactor notes controller and add ordering params (https://github.com/woocommerce/woocommerce-admin/pull/1878)
* Separate notes controller request args and add collection params

* Fix page param var

* Fix collection params sanitization

* Allow array of note types to be queried

* Add order and orderby collection params to notes controller

* Allow sorting by order and orderby params in notes data store

* Make sure notes are ordered by date and unread matches inbox note types

* Allow status or type params to use an array of items

* Add tests for notes ordering

* Remove unnecessary query arg assignment in the notes data store

* Update get_notes_count to use array for status and type
2019-04-01 10:53:34 +08:00
Joshua T Flowers 5324f223b6 Check for existence of orders before adding historical data note (https://github.com/woocommerce/woocommerce-admin/pull/1943)
* Check for existence of orders before adding historical data note

* Don't add historical data note on version upgrade
2019-04-01 10:25:53 +08:00
Joshua T Flowers 42ddfc0108 Add coupons count to data store and hook up to summary numbers in orders report (https://github.com/woocommerce/woocommerce-admin/pull/1912)
* Change coupons sum to distinct coupon count in REST API

* Hook up unique coupon count to orders summary numbers

* Add coupons count to order segmenting

* Add coupons count to expected stats in order test and revenue tests
2019-04-01 10:16:57 +08:00
ronakganatra9 3cddc714c6 issue fix woocommerce/woocommerce-admin#1801 SKU filter issue fixed. (https://github.com/woocommerce/woocommerce-admin/pull/1837)
* issue fix woocommerce/woocommerce-admin#1801 SKU filter issue fixed.

* make is sortable true.

* phpcs error fix.

* Fix PHPCS errors and warnings.

* Fix PHPCS errors and warnings.

* Update client/analytics/report/products/table-variations.js

Co-Authored-By: ronakganatra9 <ronakganatra9@gmail.com>

* Update includes/data-stores/class-wc-admin-reports-variations-data-store.php

Co-Authored-By: ronakganatra9 <ronakganatra9@gmail.com>

* changed postmeta.meta_value to meta_value
2019-03-31 20:53:48 +02:00
Joshua T Flowers 6ff9d0673a Add low product stock indicator (https://github.com/woocommerce/woocommerce-admin/pull/1866)
* Move product low stock count to controller param instead of data store

* Add totalCount to items API

* Extract unread indicators to separate file and add unread stock

* Trim initial search variable in wp_query

* Parse low stock option as an absolute integer

* Fix low stock meta comparison with product specific low stock amount

* Make group by query function static

* Check for empty strings and null values for product low_stock_amount
2019-03-29 10:45:19 +08:00
Paul Sealock 3dd99108fa Customers API: fix exact match params 2019-03-29 11:40:37 +13:00
Paul Sealock 0c4e4717d9 Merge pull request woocommerce/woocommerce-admin#1936 from woocommerce/fix/rebuild-inifinite-loop
Sync: Avoid infinite loop when REPLACE-ing SQL rows
2019-03-29 09:36:39 +13:00
Paul Sealock f9ab21e745 Sync: Avoid infinite loop when REPLACE-ing SQL rows 2019-03-28 16:19:11 +13:00
Joshua T Flowers 929ad8bf63 Remove unused categories in orders data store (https://github.com/woocommerce/woocommerce-admin/pull/1928) 2019-03-28 10:25:00 +08:00
Joshua T Flowers 896a790d8f Check if customer creation date is not null before formatting (https://github.com/woocommerce/woocommerce-admin/pull/1926) 2019-03-27 11:46:47 +08:00
Joshua T Flowers ebac101b51 Don't query products all products for empty categories (https://github.com/woocommerce/woocommerce-admin/pull/1911) 2019-03-26 13:21:46 +08:00