Commit Graph

97 Commits

Author SHA1 Message Date
Claudio Sanches bf042a428d
Merge pull request #25321 from grey-rsi/status_widget_stock_rows
Add filters for status_widget_stock_rows queries
2020-06-03 11:22:20 -03:00
Claudio Sanches 5bf9a83e58
Fixed docblock 2020-06-02 12:17:59 -03:00
Claudio Sanches 2267dcfe7e
Updated since tags 2020-06-02 12:16:54 -03:00
Sergey Ratushnuy ec91a7c3fc Small fix 2020-06-02 15:05:44 +03:00
Sergey Ratushnuy 9d711a6afa Add filters for status_widget_stock_rows queries 2020-05-13 11:02:44 +03:00
Christopher Allford 4ae1e1f5fc Extracted the repetitive Constants::get_constant( 'WC_VERSION' ) calls where possible 2020-02-04 14:02:57 -08:00
Christopher Allford 1d1413b4ee Replaced direct access of many constants with the Constants library 2020-01-31 22:18:47 -08:00
Christopher Allford 6ad091a9b7 Changed all of the constant accesses into corresponding Automattic\Jetpack\Constants usages 2020-01-28 21:21:29 -08:00
Yash Kapoor 3ed83341fc
Fixed escaping in class-wc-admin-dashboard.php
Added that space which was removed in previous commit by mistake.
2019-09-26 10:12:34 +05:30
Yash Kapoor 6ed6a753db
Fixed escaping in class-wc-admin-dashboard.php 2019-09-11 15:02:10 +05:30
Gerhard Potgieter 698625ce1d WP & PHP Upgrade Notices (#23975)
This commit introduces a banner that notifies and prompts users to upgrade their WordPress and/or PHP if they are outdated and not part of the minimum required versions going into WooCommerce 3.7.

* Add backward compatible function wp_check_php_version for sites running WP version smaller than 5.1

* Refactor some messaging, move widget to top of WC dashboard widgets, add buttons linking out to WP pages with instructions.

* Add missing variables for adding nag class

* Add styling to dashboard widget

* Rework css to use exclamation instead

* Clean up widget, make sure no widget is registered when dismissed. Add banner that links to widget and make it dismissable.

* Update constant to reflect minimum requirements.

* Don't show banner. Fix undefined variable.

* Remove dashboard widget

* Update banner link to docs site

* Add link to docs page where instructions live for updating

* Change button text

* Add UTM params to docs link

* Moved the msg logic from template to php file.

* Bail out early when PHP and WP versions are ok.

* Added missing translation functiog

* Extracted notice function from reset_admin_notices.

To follow suit with other similar functions in the file.

* Synchronize fetching of WP version.

* Removed unused functions.

* Corrected indent.

* Reduce number of variables and fixed coding standards

* Updated wording of the notice.
2019-06-26 14:09:20 -03:00
Rodrigo Primo a247e08ad0 Fix query used to get the number of low stock products in the dashboard
This commits changes the query used to get the number of low stock
products in the WooCommerce Status widget in the admin dashboard. This
query should only count published products and ignore products with
other statuses to match the behavior used in the low stock report.
2019-05-16 09:45:44 -03:00
Rodrigo Primo 6e976c7f0c Remove unnecessary conditions from out of stock query
In the query to get the number of out of stock products for the admin
dashboard widget, it is not necessary to use `1=1` and also not
necessary to use `posts.post_type IN ( 'product', 'product_variation' )`
as only products are added to wp_wc_product_meta_lookup.
2019-05-16 09:41:52 -03:00
Gerhard 36cab83d76 Update out of stock dashboard widget to use same query as in reporting, this only counts published products. 2019-05-13 11:02:50 +02:00
Mike Jolley a6a035ec92 Fix low stock query to ref correct lookup table column 2019-03-12 22:16:42 +00:00
Mike Jolley a3c2dcd8f2 Update from master 2019-03-08 09:50:56 +00:00
Mike Jolley 0782d39a55 Stock status 2019-03-07 14:32:20 +00:00
Mike Jolley 7aa82a1829 Use day, not time, in status widget for caching 2019-03-06 17:25:35 +00:00
Mike Jolley 611bf3b1dd Price filter + stock widget requires lookup table 2019-02-28 14:24:05 +00:00
Mike Jolley 2e4bcebfb8 Ignore specific rules 2019-02-27 15:33:51 +00:00
Mike Jolley 3d8c58e110 status_widget_stock_rows lookups 2019-02-15 13:37:51 +00:00
Mike Jolley 10518228aa
Merge pull request #22318 from Prospress/fix/21202
Only include the network orders widget on the main site dashboard
2019-01-22 14:38:46 +00:00
Gerhard 6220399163 Switch to use v3 of the API for network orders. 2019-01-14 09:15:20 +02:00
Ron Rennick 89855b749d Only include the network orders widget on the main site dashboard 2019-01-01 16:15:28 -04:00
Ron Rennick 4b44156882 phpcs sniff fixes excluding DB queries 2019-01-01 16:14:02 -04:00
Ron Rennick d0672b68c6 Capitalize dashboard widget titles 2018-11-14 13:34:15 -04:00
Gerhard 1af659e73b comment_type should be review for the latest reviews dashboard widget. 2018-10-26 13:16:16 +02:00
Beka Rice 818c68fc83 Fix multisite dashboard widget to use proper order number 2018-06-08 11:59:27 -04:00
Rodrigo Primo 23b69eba53 Use phpcbf to fix coding standard violations in includes/admin
After using phpcbf to fix the coding standard violations, I did some manual adjustments to the changes, especially in poorly indented files.
2018-03-05 16:21:35 -03:00
Chris Marslender 81d1136169
Avoid core list class, so that small screen styling doesn't break 2017-11-17 17:06:24 -07:00
Chris Marslender d94f69d114
Set up the dashboard class to load the network order widget on network admin 2017-11-17 17:00:48 -07:00
Chris Marslender 24e9811cbd
Move network order styles to their own file, and load this with the widget 2017-11-17 16:44:17 -07:00
Chris Marslender 678e5c7702
Change `buyer` to `customer` in the API response 2017-11-17 15:59:18 -07:00
Chris Marslender 23ef2af311
Prefix script with `wc-` 2017-11-17 15:54:44 -07:00
Chris Marslender a8ac58af79
Make table headings translatable 2017-11-14 19:05:44 -07:00
Chris Marslender e953bd3e68
Coding standards fixes for the API endpoint 2017-11-14 19:04:45 -07:00
Chris Marslender 2731de7461
Updates for coding standards 2017-11-14 18:59:20 -07:00
Chris Marslender 77721a1637
When a user can't access any sites, or no orders are returned, show "no orders found" message 2017-11-06 10:44:55 -07:00
Chris Marslender 68e42ab6a2
Add loading indicator for the network order widget 2017-11-06 10:32:30 -07:00
Chris Marslender f4ad8b8089
Enqueue .min.js version of network order script if SCRIPT_DEBUG not enabled 2017-11-06 10:08:07 -07:00
Chris Marslender 68f309203d
Use WC_VERSION for js version on enqueue 2017-11-06 10:04:43 -07:00
Chris Marslender a7f1894847
Leave the wp_enqueue_script for network orders in the widget callback, so its always on any page with the widget 2017-11-06 10:02:42 -07:00
Chris Marslender 54c7165e16
Only add the network order widget/register the route when multisite is active 2017-11-06 09:30:44 -07:00
Chris Marslender 2cbdb5b1fe
Pass actual user blogs to the front end and make sure that the deferreds resolve even if a user doesn't have access to a site that we ask for 2017-10-24 20:45:34 -07:00
Chris Marslender 05f486ee59
very basic implementation of REST API Based network order fetching for dashboard widget 2017-10-24 19:51:55 -07:00
Claudio Sanches 8b3d1046e0 Merge pull request #15515 from woocommerce/update/15399
Tweak review settings and add global enable option
2017-06-08 15:53:00 -03:00
Mike Jolley 5ee38c54c2 Option to disable reviews globally 2017-06-08 15:26:30 +01:00
Mike Jolley 4ea9ab46a7 Avoid slow substring query 2017-06-08 12:21:55 +01:00
Mike Jolley 4251d71dab Hide replies from recent reviews widgets
Fixes #15307
2017-05-29 10:09:17 +01:00
Peter J. Herrel 3f9bcc2a09 filter recent reviews dashboard widget query 2017-03-01 18:34:42 +01:00