Commit Graph

905 Commits

Author SHA1 Message Date
Jon Surrell 2ae1bc1ab2 Protect methods 2016-12-29 11:58:43 +01:00
Jon Surrell acc98a1d6a Mark WC_Log_Handler::format_entry abstract 2016-12-29 11:58:43 +01:00
Jonathan Surrell 4318b3aa53 Improve @return signature on WC_Log_Handler::handle
Make meaning of returned bool explicit.
Update WC_Log_Handler_Email::handle accordingly.

via https://github.com/woocommerce/woocommerce/pull/12575#pullrequestreview-12381573
2016-12-29 11:58:43 +01:00
Jon Surrell ffd0d380ee Remove threshold logic from handlers.
Email handler implements threshold logic internally. Other handlers handle all logs received.
Handler constructors have changed.
2016-12-29 11:58:43 +01:00
Jon Surrell 85fa9df7fe Drop "bubbling" support for logs
The concept of bubbling or consuming logs has little benefit for our use case.
Drop support for bubbling and simplify logging.
2016-12-29 11:58:43 +01:00
Jon Surrell 4f77954bc7 Move log levels to independent class 2016-12-29 11:58:43 +01:00
Jon Surrell d88ea4ecea Spelling and doc fixes 2016-12-29 11:58:43 +01:00
Jon Surrell 5e9d4189fb Include missing 5 in log level severities 2016-12-29 11:58:42 +01:00
Jon Surrell a0670cfae8 Add woocommerce_format_log_entry filter to base WC_Log_Handler class 2016-12-29 11:58:42 +01:00
Jon Surrell 2283956db6 Provide correct class name to woocommerce_log_handler_set_threshold filter 2016-12-29 11:58:42 +01:00
Jon Surrell 0c5634c99f Version 1.0.0 for abstract wc log handler 2016-12-29 11:58:42 +01:00
Jon Surrell 822981c009 Improve handle signature
The signature of WC_Log_Handler::handle mirrors log messages which is more intuitive.
Method docblocks have also been improved and are more complete.
2016-12-29 11:58:42 +01:00
Jon Surrell ad03597a3d Simplify default log entry format
Remove punctuation. Space separate values:

TIMESTAMP LEVEL MESSAGE
2016-12-29 11:58:42 +01:00
Jon Surrell 722b288b79 Remove _ from private/protected properties 2016-12-29 11:58:42 +01:00
Jon Surrell 6ec75d8c2e Change defualt log handler threshold to DEBUG following discussion with team members. 2016-12-29 11:58:42 +01:00
Jon Surrell b5cebcab6c Fix scrutinizer issues 2016-12-29 11:58:42 +01:00
Jon Surrell d5d1ab16ea Fix docblocks 2016-12-29 11:58:42 +01:00
Jon Surrell 4262a72af6 Use wp_parse_args for default args 2016-12-29 11:58:42 +01:00
Jon Surrell 44ea69c579 Adds tests for bubbling, etc.
Add tests teardown to cleanup log files
Fix errors in log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell 0e0433195d Add logic for log level filtering to `WC_Log_Handler`. 2016-12-29 11:58:42 +01:00
Jon Surrell 9a0efcfe55 Add abstract WC_Log_Handler class
Abstract base class is implemented with default formatting implementations.
`$timestamp` has been added to the `WC_Log_Handler::handle` implementation. This ensures all handlers are passed the same timestamp for the same message.
`_legacy` context has been added to `WC_Log_Handler_File` to ensure handle deprecated `WC_Logger::add` provides the same log entries as before.

Fix CS problems.
2016-12-29 11:58:42 +01:00
Mike Jolley daea231ab7 Merge pull request #12666 from woocommerce/select2-4
Upgrade Select2 to V4
2016-12-24 14:40:09 +00:00
Mike Jolley 6b511e84be Sorting 2016-12-23 15:14:27 +00:00
Manos Psychogyiopoulos 40bf6afc29 fix incorrect inline comments
Ref: 01aba1fd2b
2016-12-22 19:41:23 +02:00
Mike Jolley 03b581f72e Refunds API/get_data() missing ID
Fixes #12672
2016-12-22 14:52:37 +00:00
Mike Jolley d5b346fc40 Variation specific backwards compatibility 2016-12-22 14:30:47 +00:00
Mike Jolley 56fef5b4f6 More styling settings tweaks 2016-12-21 11:36:48 +00:00
Mike Jolley 20680203bb Add actions for all object types 2016-12-19 17:09:52 +00:00
Mike Jolley 5ae62959d8 Notices 2016-12-19 11:59:10 +00:00
Manos Psychogyiopoulos 87bb9adf08 use CRUD to add line item meta 2016-12-19 13:27:32 +02:00
Manos Psychogyiopoulos 3a8eae195b maintain order item meta action hooks 2016-12-18 18:13:11 +02:00
Mike Jolley 3e2a758c65 Fix meta data read 2016-12-14 11:23:17 +00:00
Mike Jolley 1e80db6021 Force meta to be written on creation
#12567
2016-12-12 13:56:35 +00:00
Mike Jolley 0ce99fbdbb Merge pull request #12558 from woocommerce/crud-reduce-queries
CRUD reduce queries
2016-12-10 12:35:45 +00:00
Mike Jolley 87579c013d Fix attribute output
Closes #12556
2016-12-09 16:43:22 +00:00
Mike Jolley 5562cfc1f6 Lazy load product meta data 2016-12-09 12:18:21 +00:00
Mike Jolley 90ff6705be Only validate attachment IDs when set after read 2016-12-08 16:08:10 +00:00
Mike Jolley 47fbae4d26 Product Visibility Taxonomies (#12527)
* Convert visibility and featured to taxonomy

* Comment

* Add missing tax_queries

* Only check SKU after read.

* Added visibility term for outofstock products to speed those queries up al

* wc_bool_to_string
2016-12-08 10:56:45 +00:00
Mike Jolley 070926f7e6 woocommerce_downloadable_file_hash filter
Closes #12444
2016-12-06 11:09:03 +00:00
Mike Jolley 1f04cf9dc0 Comment on has_all_attributes_set 2016-12-05 13:15:25 +00:00
Mike Jolley 2780688a70 wc_get_price_html_from_text 2016-12-05 13:13:30 +00:00
Mike Jolley ba56274662 Move get_price_suffix back to main class 2016-12-02 17:02:06 +00:00
Mike Jolley d67f17a789 Put get_availability functions back in main product classes. 2016-12-02 16:46:35 +00:00
Manos Psychogyiopoulos b10810824f add 'id' to WC_Abstract_Legacy_Product __isset 2016-11-27 16:30:13 +02:00
Mike Jolley fb2804a5ab Code comments 2016-11-25 14:48:20 +00:00
Mike Jolley 8d30e1d044 Correct title filter 2016-11-25 10:41:42 +00:00
Mike Jolley 6b8fc659bf Put get_title back in main class 2016-11-24 14:19:52 +00:00
Mike Jolley d7dfdd3d10 Wrap all deprecation calls. 2016-11-23 16:15:00 +00:00
Mike Jolley 2b1c762142 Set parent 2016-11-23 15:37:34 +00:00
Mike Jolley 885dad605a Interface naming 2016-11-22 13:54:51 +00:00