Commit Graph

274 Commits

Author SHA1 Message Date
Albert Juhé Lluveras dab7cf7dff Respect manual offsets in default before/after params (https://github.com/woocommerce/woocommerce-admin/pull/2042) 2019-04-15 19:28:19 +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 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
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
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 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
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
Jeff Stieler 2d8f8f9137 Merge pull request woocommerce/woocommerce-admin#1848 from woocommerce/add/1756-snooze-admin-notes
Add "remind me later" functionality to StoreAlert component.
2019-03-21 08:41:44 -06:00
Albert Juhé Lluveras 1cf134d1fa Fix PHP notices on orders data store (https://github.com/woocommerce/woocommerce-admin/pull/1870) 2019-03-21 15:35:25 +01:00
Jeff Stieler 2eecb6c375 Add “is snoozable” flag to WC_Admin_Note. 2019-03-20 08:52:22 -06:00
Albert Juhé Lluveras 58154d1d39 Activity Panel: set orders unread indicator based on real data (https://github.com/woocommerce/woocommerce-admin/pull/1824) 2019-03-19 11:57:11 +01:00
Albert Juhé Lluveras e6cf40e3f0 Allow sorting by tax_code in Taxes report (https://github.com/woocommerce/woocommerce-admin/pull/1812) 2019-03-15 21:44:03 +01:00
Joshua T Flowers 9d58f8ca58 Fix deleted coupon data sync (https://github.com/woocommerce/woocommerce-admin/pull/1753)
* Delete coupon from lookup table when permanently deleted

* Don't sync null ID coupons on order sync
2019-03-14 12:12:35 +08:00
Jeff Stieler bfe5a75e98 Update text domain. (https://github.com/woocommerce/woocommerce-admin/pull/1795)
* Translation call text domain change from “wc-admin” to “woocommerce-admin”.

* Fix .pot file generation.

* Fix errantly closed array item in /revenue/stats controller.

* Rename plugin zip, main file, and repo name to "woocommerce-admin".
2019-03-13 11:14:02 -06:00
Paul Sealock 00eb04255f Merge pull request woocommerce/woocommerce-admin#1750 from woocommerce/fix/deleted-product-error
Fix deleted product error
2019-03-13 12:06:22 +13:00
Justin Shreve 1348245406 Add store notice around processing historical data. (https://github.com/woocommerce/woocommerce-admin/pull/1763)
* Add store notice around processing historical data.

* Cleanup

* Handle PR feedback.

* Clean up `add` logic and add empty content_data. Also add logic to get_notes_count so that we can hide unactioned statuses.

* Add the ability to update a note, and to also mark a status when an alert is clicked.

* Remove mark_actioned call on sync

* add missing todo
2019-03-12 09:13:20 -04:00
Albert Juhé Lluveras 6c9b96f49a Make variations and coupons endpoints return zero-value items (https://github.com/woocommerce/woocommerce-admin/pull/1765)
* Make categories endpoint return zero-value items

* Rename PHP variable to make it more specific

* Remove uneeded lines

* Make variations and coupons endpoints return zero-value items

* Remove second parameter from get_ids_table
2019-03-12 11:11:28 +01:00
Albert Juhé Lluveras d3230d8dae Make categories endpoint return zero-value items (https://github.com/woocommerce/woocommerce-admin/pull/1755)
* Make categories endpoint return zero-value items

* Rename PHP variable to make it more specific

* Remove uneeded lines

* Remove second parameter from get_ids_table
2019-03-12 10:50:53 +01:00
Albert Juhé Lluveras cf162dda7f Taxes report: sort tax rates numerically instead of alphabetically (https://github.com/woocommerce/woocommerce-admin/pull/1766)
* Taxes report: sort tax rates numerically instead of alphabetically

* Use DECIMAL(7,4) for tax_rate sorting
2019-03-12 10:31:19 +01:00
Tiago Noronha 965a4a6cb5 Merge pull request woocommerce/woocommerce-admin#1758 from woocommerce/fix/1736
Add StoreAlerts placeholder
2019-03-08 19:52:57 +00:00
Tiago Noronha 2e2fb90cde Add support for notes count by note type 2019-03-08 15:17:24 +00:00
Albert Juhé Lluveras d2c0dd5555 Make products and rates endpoints return zero-value items (https://github.com/woocommerce/woocommerce-admin/pull/1722)
* Make products endpoint return zero-value items

* Make rates endpoint return zero-value items

* Several fixes

* Add tests

* Simplify code

* Merge both queries into one to simplify code

* Rename 'get_outer_from_sql_params' to 'get_from_sql_params'
2019-03-06 12:36:43 +01:00
Joshua Flowers b1890190c7 Get product ID for line item from meta table instead of deleting 2019-03-06 16:03:54 +08:00
Joshua Flowers c6c71b0238 Delete product IDs from lookup table on delete 2019-03-06 15:09:38 +08:00
Joshua Flowers 1715e98b98 Don't fetch extended attributes if product doesn't exist 2019-03-06 14:25:59 +08:00
Peter Fabian 99e88706ad Merge pull request woocommerce/woocommerce-admin#1681 from woocommerce/fix/1476-2
Updated is_returning_customer definition to use refactored function.
2019-03-05 13:00:07 +01:00
Peter Fabian 1b90296bba Updated timezone handling to be in line with other WC code. 2019-02-25 20:05:25 +01:00
Peter Fabian 3f9a43fdd0 Added timezone to datetime to correctly identify first order(s).
If default PHP timezone is UTC, then any order between first order and positive UTC offset is identified as 'first', which is incorrect.
2019-02-23 18:38:45 +01:00
Peter Fabian 3ce686e6cd Updated is_returning_customer definition to use refactored function. 2019-02-22 22:06:21 +01:00
Paul Sealock 62a6b619d9 Taxes Report: allow segmentation by tax 2019-02-22 11:37:15 +13:00
Justin Shreve 2af0aedd95 Add comparison support to the coupons report (https://github.com/woocommerce/woocommerce-admin/pull/1647) 2019-02-21 10:16:44 -05:00
Joshua T Flowers aef11ef586 Refactor customer ID creation (https://github.com/woocommerce/woocommerce-admin/pull/1619)
* Fix indendtation for table creations

* Refactor how customers are created on order update

* Check if user has a role of customer or previous orders before storing

* Add tests for user creation

* Allow null emails for customers

* Only select customer_id in guest ID query
2019-02-20 10:30:00 +08:00
Joshua T Flowers 73ff2d37e8 Update activity panels order endpoint (https://github.com/woocommerce/woocommerce-admin/pull/1578)
* Only show customer name if available

* Map customer data to extended_info in orders API response

* Add gross total and refund total to orders API response

* Hook up report orders endpoint to activity panel orders

* Add on-hold orders to activity panel orders

* Destructure extended_info in case of filtering

* Add customer link to orders panel
2019-02-20 09:51:43 +08:00
Joshua T Flowers 44604bcd02 Reduce net order total by refunded amount less tax and shipping refunds (https://github.com/woocommerce/woocommerce-admin/pull/1600)
* Reduce net order total by refunded amount less tax and shipping refunds

* Fix net_totals in tests with refunds
2019-02-20 09:39:42 +08:00
Justin Shreve 4f64358c8e Fix customer filters and download user filtering (https://github.com/woocommerce/woocommerce-admin/pull/1618)
* Add the ability to search name, username, and email fields on the customer endpoint, update autocompletors, add in include parameter.

* Update the username to be returned in the download response, update download filtering based on customer id, and only rename include parameter on main customers endpoint.
2019-02-19 14:35:29 -05:00
Joshua T Flowers f0ec3c49a1 Add tax refund calculations (https://github.com/woocommerce/woocommerce-admin/pull/1556)
* Add item and shipping refund calucations to taxes on order update

* Sync taxes on refund delete

* Fix up tax stats API testing

* Add refunds to tax stats API tests
2019-02-18 10:20:16 +08:00
Peter Fabian f7d0d2379f Merge branch 'master' into fix/489-date_date_gmt
# Conflicts:
#	includes/class-wc-admin-api-init.php
2019-02-15 17:07:38 +01:00
Albert Juhé Lluveras b61dff32f9 Sort tabular data when selecting a Summary Number (https://github.com/woocommerce/woocommerce-admin/pull/1564)
* Sort tabular data when selecting a Summary Number

* Fix 'orderby' param in orders endpoint
2019-02-15 11:54:41 +01:00