Commit Graph

18551 Commits

Author SHA1 Message Date
Jon Surrell e722870aa4 Fix tests for PHP 5.2 2016-12-29 11:58:42 +01:00
Jon Surrell 8600ccc6de Restructure log tests to own directory
Also moves parent::tearDown to end of tearDown
Fix phpcs problems.
2016-12-29 11:58:42 +01:00
Jon Surrell fe02d44e31 Defauly log file level is DEBUG 2016-12-29 11:58:42 +01:00
Jon Surrell 7ba54d8617 Add test for log() === [level_short_method]() 2016-12-29 11:58:42 +01:00
Jon Surrell 227651df77 Add `setMethods` to test mocks
This may improve php 5.2 test failures
2016-12-29 11:58:42 +01:00
Jon Surrell b2935f35ed Fix file handle regression 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 83aad2ba2e Use older test mock syntax for legacy compatibility. 2016-12-29 11:58:42 +01:00
Jon Surrell c5c0563f7c Restore deprecated functions WC_Logger::clear & WC_Logger::remove
Also updates clear test to supply required argument.
2016-12-29 11:58:42 +01:00
Jon Surrell fda6ab57bc Fix tests for compatibility with PHP5 2016-12-29 11:58:42 +01:00
Jon Surrell 36873e5097 Provide basic messages for email log handler 2016-12-29 11:58:42 +01:00
Jon Surrell 55963b09a8 Extract anonymous functions to improve test compatibility. 2016-12-29 11:58:42 +01:00
Jon Surrell 479ef85cd8 Add email log handler 2016-12-29 11:58:42 +01:00
Jon Surrell 864e65de10 Remove redundant __constructor 2016-12-29 11:58:42 +01:00
Jon Surrell 3ef2ae611d Cleanup "A" test log file 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 c418623fed Add tag context test for file log handler 2016-12-29 11:58:42 +01:00
Jon Surrell 9dc30a7203 Remove 2nd filter parameter that would never be called 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
Jon Surrell 7e79746302 Update tests for WC_Logger 2016-12-29 11:58:42 +01:00
Jon Surrell a2cce14711 Register file log handler by default
Add wc_register_file_log_handler function.
Calls add_filter with register function to include handler by default
2016-12-29 11:58:42 +01:00
Jon Surrell d9dcabf8f2 WC_Logger registers and delegates logging to handlers 2016-12-29 11:58:42 +01:00
Jon Surrell e922efb0f7 Extract file log handler 2016-12-29 11:58:42 +01:00
Claudio Sanches 604297ce85 Merge pull request #12700 from franticpsyx/fix-product-search-get-post-parent-fatal-error
[2.7] Fix product search issues
2016-12-27 22:46:25 -02:00
Manos Psychogyiopoulos b5c56737c5 merge branch 'master' into fix-product-search-get-post-parent-fatal-error 2016-12-27 10:57:52 +02:00
Manos Psychogyiopoulos be436b629d fix include field typo 2016-12-27 10:36:44 +02:00
Manos Psychogyiopoulos ae9f4eacc4 fix get_post_parent fatal error 2016-12-27 10:34:32 +02:00
Claudio Sanches 539099c7d7 Include $endpoint in woocommerce_endpoint_X_title filter #12676 2016-12-25 20:43:25 -02: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
Mike Jolley e9be3a425a Handle search params in filters
Closes #12685
2016-12-23 14:45:58 +00:00
Mike Jolley a3f8ffb101 Ensure price is set 2016-12-23 14:30:47 +00:00
Mike Jolley a2a16a2ec0 Merge pull request #12683 from franticpsyx/shipping-rate-taxes-array-not-saved
[2.7] Shipping order item taxes array not saved on checkout
2016-12-23 14:19:43 +00:00
Mike Jolley 859727d462 Merge pull request #12678 from franticpsyx/rest-api-set-order-item-action
[2.7] Add 'woocommerce_rest_set_order_item' REST API hook
2016-12-23 14:18:31 +00:00
Mike Jolley e8b1fe1bf2 Merge pull request #12679 from franticpsyx/rest-api-totals-excl-tax
[2.7] Calculate REST order item totals excluding tax if undefined (?)
2016-12-23 14:17:07 +00:00
Mike Jolley b15465bbdd Fix fade in 2016-12-23 14:08:39 +00:00
Mike Jolley 04c28403c8 Minify 2016-12-23 14:08:39 +00:00
Mike Jolley fd215b99fd Merge pull request #12687 from shoheitanaka/patch-7
Mistake numbering in sprintf
2016-12-23 13:04:19 +00:00
Shohei Tanaka 79686dbd8a Mistake numbering in sprintf
change %3$s to %2$s
2016-12-23 20:50:40 +09:00
Mike Jolley ade5574d98 Add slashes to string based selectors to fix attributes containing quotes 2016-12-22 22:54:06 +00:00
Mike Jolley 99527e8013 Merge pull request #12680 from franticpsyx/remaining-incorrect-inline-comments
[2.7] Remaining inline comments about pointers
2016-12-22 22:37:33 +00:00
Mike Jolley 364d4bd82c Merge pull request #12675 from maciekkus/feature/make-tax-includes-text-consistient
Make 'includes tax' text wrapping with <small> tag consistient across order and cart table
2016-12-22 22:37:06 +00:00
Maciej Kuś e5bae8b7af space preserved before "included_tax" small element 2016-12-22 20:05:46 +01:00
Manos Psychogyiopoulos d7afab3930 fix saving of shipping order item taxes on checkout 2016-12-22 20:49:42 +02:00
Manos Psychogyiopoulos 40bf6afc29 fix incorrect inline comments
Ref: 01aba1fd2b
2016-12-22 19:41:23 +02:00
Manos Psychogyiopoulos 42e09eac32 make rest api order item totals - always excl tax 2016-12-22 19:23:07 +02:00