Commit Graph

106 Commits

Author SHA1 Message Date
Rodrigo Primo f3b0d755fd Correct singular form usage in class-wc-admin-report.php
For more information see https://github.com/woocommerce/woocommerce/issues/24004
2019-06-27 11:03:35 -03:00
Rodrigo Primo 3f2cacb1be Use phpcbf to fix phpcs violations in class-wc-admin-report.php 2019-06-27 10:48:31 -03:00
Adrien Foulon 700d89f8ff
Fix missing parenthesis 2019-03-14 23:55:02 +01:00
Adrien Foulon d53d6f6a7d
phpcs 2019-03-14 23:18:47 +01:00
Adrien Foulon 7a470fb117
Separating nocache and cache logic for clarity 2019-03-14 23:16:55 +01:00
Adrien Foulon 0391b11b20
Review 2019-03-14 23:05:54 +01:00
Adrien Foulon 7d77241ed2
Move variable definitions in class 2019-03-14 16:44:26 +01:00
Adrien Foulon 005d7491cf
Cleanup 2019-03-13 22:28:09 +01:00
Adrien Foulon 55339a2870
Cache setter and getter wrapper 2019-03-13 22:21:09 +01:00
Adrien Foulon 8d866d9df7
Fix error wpdb global 2019-03-13 21:19:21 +01:00
Adrien Foulon 322eed0b2c
Fix error 2019-03-13 19:06:47 +01:00
Adrien Foulon 11e8f087e8
Fix get cached query call 2019-03-13 18:18:59 +01:00
Adrien Foulon 99358e7763
Remove whitespaces on empty lines 2019-03-13 18:00:13 +01:00
Adrien Foulon eefbaff3ea
Remove whitespaces on empty lines 2019-03-13 17:59:34 +01:00
Adrien Foulon cc65b2d856
Apply code review 2019-03-13 17:54:13 +01:00
Adrien Foulon 80435d779f
Apply code review 2019-03-13 17:52:28 +01:00
Adrien Foulon fa9b08c9a4
Make the maybe_update_transients hook static so it's not constructor dependant
Because extended classes don't call the parent constructor and that would break BC
2019-03-13 13:47:00 +01:00
Adrien Foulon bc34c6e3eb
Fix php5.2 support 2019-03-13 12:11:49 +01:00
Adrien Foulon a520cb5f44
Rename function 2019-03-13 11:55:18 +01:00
Adrien Foulon b2ad443db5
phpcs 2019-03-13 11:51:48 +01:00
Adrien Foulon 95cbe5c969
phpcs 2019-03-13 11:51:24 +01:00
Adrien Foulon 13b5a07383
Update class-wc-admin-report.php 2019-03-13 11:35:42 +01:00
Adrien Foulon ee403d6000
Improve the speed of the admin dashboard by only updating transients once per class
While debugging the admin dashboard I found out that some transients where updated up to 5 times during the page load, reading is fast but writting is costy, so the query where adding a total of 200ms to the page load (because they are also huge transients)

I've rewritten the transient storage procedure so that per class a transient is only written once at the end of the request

I also found that a continue was changed for a break line 139 for php7.3 and the new warning it incurs, the problem is it was changed the  wrong way, it should have been a "continue 2" to continue the foreach and not a break.

That makes me wonder if some others like this may have slipped in the code.
2019-03-13 11:33:03 +01:00
Mike Jolley 7def966e4f Impoved JSON handling 2019-02-20 12:00:47 +00:00
Rodrigo Primo a9e532022a Replace `continue` inside `switch` statement with `break`
PHP 7.3 will generate a warning when `continue` is used inside a `switch` statement. For more information see the relevant section in https://make.wordpress.org/core/2018/10/15/wordpress-and-php-7-3/
2018-11-20 16:24:11 -02:00
rspublishing 2eca0d73bd Duplicate queries for WC_Admin_Report->get_order_report_data() 2018-03-23 11:15:21 +02: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
Mike Jolley 2b1243ea04 Confirm navigation if nonce has expired in reports.
Closes #17850
2017-11-22 11:30:22 +00:00
Jaydeep Rami 46d3638089 Fix missing return statement (#16148)
* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement
2017-07-20 18:01:14 +01:00
Mike Jolley 25cbd4ada8 Sanitize keys in reports class 2017-07-12 10:53:39 +01:00
Mike Jolley 472b983498 7day should start from midnight, not current time
Fixes #15870
2017-06-30 11:34:07 +01:00
Mike Jolley aacb01d1e7 Merge branch 'pr/13503'
# Conflicts:
#	assets/css/twenty-seventeen.css
#	assets/css/woocommerce-layout.css
#	assets/css/woocommerce-layout.scss
#	assets/css/woocommerce.css
2017-04-27 12:46:05 +01:00
Claudio Sanches 2da71bd7fb Prevent nonce check outside admin when calculating for reports
Fix all REST API reports endpoints.

Fixes #14496
2017-04-18 20:33:25 -03:00
Mike Jolley 75f79b3279 Se 20y limit on datepicker too 2017-04-03 10:46:37 +01:00
Mike Jolley b50312a1d8 Prevent bad timestamps being used for dates in reports and add nonce field 2017-03-31 11:50:11 +01:00
Mike Jolley 9260babfba Fix end date when no date is set 2017-03-27 12:11:08 +01:00
Aristeides Stathopoulos 10ffc92a73 Inline control structures are not allowed 2017-03-07 22:24:24 +02:00
Claudio Sanches 9c27661dea Synchronized with master 2017-01-12 17:53:15 -02:00
Mike Jolley 00250e8eab Fix date query format 2017-01-10 15:50:05 +00:00
Jon Surrell aee5917440 Change wc_safe_dump to wc_print_r
Match print_r arguments, this makes usage obvious.
2016-12-29 11:58:43 +01:00
Jon Surrell e42d2e61fd Update print_r to use wc_safe_dump 2016-12-29 11:58:42 +01:00
Mike Jolley a9a21bf9e0 Fix sale date series
Fixes #12609
2016-12-16 12:35:33 +00:00
Rami Yushuvaev 55f08d62ae add translators comments 2016-10-29 23:03:28 +03:00
Aristeides Stathopoulos 9668247b95 WordPress.PHP.YodaConditions.NotYoda 2016-09-09 03:14:28 +03:00
Aristeides Stathopoulos 6ac7f03241 Generic.Formatting.DisallowMultipleStatements.SameLine 2016-09-02 06:40:52 +03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 0516e96843 PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket 2016-09-02 04:33:57 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Aristeides Stathopoulos fb62d280b5 WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore 2016-08-27 09:07:42 +03:00
Aristeides Stathopoulos e69fafbda7 WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter 2016-08-27 09:06:22 +03:00