Commit Graph

112 Commits

Author SHA1 Message Date
Nestor Soriano 1cf6b9d39e
Extra check for not showing the "WooCommerce Setup" widget in dashboard
if WC Admin is disabled
2021-04-08 09:31:51 +02:00
Moon 00a272fa85
Merge pull request #29174 from woocommerce/add/28568-dashboard-widget-finish-setup
Add/28568 dashboard widget - setup
2021-03-02 16:46:51 -08:00
Moon d013d7f765 Move init logic to should_display_widget 2021-03-02 16:06:10 -08:00
louwie17 893fe6cc24
Merge pull request #29149 from woocommerce/update/28569_status_widget_net_sales_link
Woocommerce dashboard status widget net sales link and logic
2021-02-25 09:09:29 -04:00
Moon 781c5e24d7 Status dashboard widget should be rendered only if onboarding tasks have been completed or hidden 2021-02-22 15:29:47 -08:00
Claudio Sanches b6fe772d54
Merge pull request #29109 from woocommerce/update/add-tracking-to-status-widget
Add tracking to WooCommerce Status widget
2021-02-18 20:03:50 -03:00
Lourens Schep 966aca59ad Removed external class and moved logic to private functions 2021-02-18 16:05:00 -04:00
Lourens Schep 4663d31f66 Fix some formatting changes 2021-02-18 12:01:52 -04:00
Lourens Schep 136e82ee01 Added a v2 report class that makes use of the wc-analytics if wc admin is not disabled 2021-02-18 12:01:52 -04:00
Moon 3707764736 Add tracking to WooCommerce Status widget -- net-sales, order-processing, orders-on-hold, low-stock, and out-of-stock 2021-02-15 16:41:14 -08:00
Lourens Schep 5c6331593a Remove unnecessary wp-admin from urls 2021-02-10 16:42:04 -04:00
Lourens Schep 2db09d410b Change widget stock links to new analytics page when wc_admin is not disabled 2021-02-10 15:04:04 -04:00
Rodrigo Primo 09faf8ba84 Fix: use the correct parameter when calling get_avatar()
`WC_Admin_Dashboard::recent_reviews()` was calling `get_avatar()` passing `$comment->comment_author` which is not one of the list of parameters that the function accepts to get the avatar. As a result, the widget that displays the recent reviews in the admin dashboard was never displaying the avatar of the user that left the review. This commit fixes this issue by passing `$comment->comment_email` instead. I opted to use `$comment->comment_author` as it should be available for reviews left both by authenticated and anonymous users and because getting the comment object wouldn't be so simple (either we need to perform an extra query for each review or deprecate the `woocommerce_report_recent_reviews_query_from` filter).
2020-10-22 17:43:59 -03:00
Rodrigo Primo e91872c1a8 PHPCS fixes 2020-10-22 17:34:47 -03:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
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