Commit Graph

35 Commits

Author SHA1 Message Date
Jeff Stieler cc4ca8b965 Move tracks helper function into core functions file. 2019-07-02 08:27:31 -06:00
Jeff Stieler b8abe63d15 Don’t create a batch job that exceeds the range end. 2019-06-26 14:23:56 -06:00
Paul Sealock 18d535d65a Action Scheduler: fix potential endless sync 2019-06-18 10:39:16 +12:00
Joshua T Flowers 2f49a0a5a7 Prevent multiple imports from running simultaneously (https://github.com/woocommerce/woocommerce-admin/pull/2414)
* Prevent multiple imports from running simultaneously

* Cancel previous imports before importing again in tests
2019-06-13 23:32:58 +08:00
Albert Juhé Lluveras db169972d2 Fix comment 2019-06-12 23:58:20 +02:00
Albert Juhé Lluveras 4a5be15057 Merge branch 'master' into fix/2343-skip_existing-not-importing-all-data 2019-06-12 23:56:35 +02:00
Albert Juhé Lluveras b1bd53cb4e Adds comments to explain why page is fixed when skip_existing is set to true 2019-06-12 23:51:56 +02:00
Albert Juhé Lluveras ddbb8f0be8 Add tracks to import jobs (https://github.com/woocommerce/woocommerce-admin/pull/2193)
* Add tracks to import jobs

* Include tracks client if missing when recording events

* Add batch_number, batch_size and import_count properties to import jobs

* Reorder code
2019-06-11 19:55:10 +02:00
Albert Juhé Lluveras 5d01cee56c Add progress bars to Historical Data Import screen (https://github.com/woocommerce/woocommerce-admin/pull/2312)
* Hook up import/status endpoint to Historical Data Import screen

* Fix PHP tests

* Add speak message when the import is complete

* Several fixes

* Cleanup

* Update progress bars every 3 seconds and bugfixes

* Rename ongoingImport to activeImport

* Use timestamp to identify queries

* Use timestamps for historical data state

* Add 'initializing' status

* Cleanup

* Pass less props around

* Refactor getStatus

* Set stop timestamp on request error

* Typo
2019-06-11 14:47:53 +02:00
Albert Juhé Lluveras 5a732d565a Fix 'skip_existing' option making not all data not to be imported 2019-06-10 12:45:01 +02:00
Jeff Stieler 0d863ae7a6 Exclude auto-draft and trashed orders from imports. 2019-05-20 13:51:44 -06:00
Ron Rennick 2aaf7f1d57 Merge pull request woocommerce/woocommerce-admin#2219 from woocommerce/fix/2195
Add filters for customer roles
2019-05-15 15:27:50 -03:00
Joshua T Flowers b8bd689fd0 Import refunds on data sync (https://github.com/woocommerce/woocommerce-admin/pull/2205) 2019-05-14 18:37:09 +08:00
Ron Rennick 33919a652d phpcs sniff fixes 2019-05-13 13:48:22 -03:00
Ron Rennick 28b10f2eb6 restrict customer import to customer role with filter 2019-05-13 13:47:16 -03:00
Joshua T Flowers fb91cd8788 Add import status endpoint and progress options (https://github.com/woocommerce/woocommerce-admin/pull/2189)
* Update import progress during batches

* Add import status route for querying import progress

* Update import totals before import start

* Move wc admin notes to separate action scheduler group

* Add import totals route to query customer and order totals

* Add wc helper queue job processing method

* Add import status and total tests

* Separate action type clearing for imports and notes

* Typecast action types as array in clear_pending_wcadmin_actions()
2019-05-13 10:30:07 +08:00
Joshua T Flowers 3382fb7011 Record refunds separate from order entries (https://github.com/woocommerce/woocommerce-admin/pull/2083)
* Sync refunds on order sync

* Separate order and refund class extensions

* Add customer functions to order and refund classes

* Change products store to work with refund amounts

* Return early for refunds in coupon data store

* Allow refund processing in tax data store

* Remove unused refund amounts from tables and data stores

* Change order counts to parse out refund entries

* Include refunded orders in default queried statuses

* Only process order number filter on shop order post types

* Extract shared order and refund methods to trait

* Fix renamed schedule_single_order_import method

* Bump PHP and WP version requirements
2019-05-10 14:39:25 +08:00
Jeff Stieler cda1645672 Review feedback changes.
Incorrect comment and unused function argument.
2019-05-01 08:30:27 -06:00
Joshua Flowers 0a229e3654 Add delete batch actions for orders and customers 2019-04-30 17:37:20 -06:00
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
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 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
Jeff Stieler f08fda5271 Merge pull request woocommerce/woocommerce-admin#1813 from woocommerce/add/1699-clear-jobs
Add a custom “cancel all” method to our scheduled action data store.
2019-03-15 15:00:52 -06: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
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
Jeff Stieler 04db0e2b8d Add a custom “cancel all” method to our scheduled action data store.
Performs direct database manipulation for performance (with large datasets).
2019-03-08 18:41:59 -07:00
Joshua T Flowers 4d80cad52e Add rebuild tool to settings page (https://github.com/woocommerce/woocommerce-admin/pull/1737)
* Add button input type to analytics settings

* Add callback prop and disabled state to setting

* Add rebuild tool to settings page

* Re-enable setting if error is caught

* Remove rebuild tool from system tools page

* Move report build success message to API response

* Add back key for settings map

* Fix misspelled option group classname

* Conditionally add rebuild tool to non-wc-status page instead of removal hook
2019-03-06 13:32:05 +08:00
Justin Shreve b7d36c90e8 Clear scheduled actions on plugin deactivate (https://github.com/woocommerce/woocommerce-admin/pull/1715) 2019-02-28 16:47:58 -05:00
Ron Rennick 4cad583332 add action scheduler group 2019-02-21 15:44:35 -04:00
Joshua T Flowers 08e43c35cf Execute single order pending jobs immediately when wp_debug is enabled (https://github.com/woocommerce/woocommerce-admin/pull/1581)
* Execute all pending jobs when debug mode is enabled

* Only process single order jobs immediately

* Replace wp_debug condition with a filter

* Bypass scheduling and process the order on save_post

* Change hook name to include order
2019-02-20 10:05:11 +08:00
Jeff Stieler e5cdad1683 Move report table syncing methods to their own class and kick off initial sync using WC_Admin_Install. 2019-02-08 12:57:11 -08:00