Mike Jolley
5272f836a4
Merge branch 'read-price-data-caching'
2017-01-04 13:56:14 +00:00
Mike Jolley
564d3f4e33
Feedback
2017-01-04 13:56:07 +00:00
Mike Jolley
13018752ea
Merge pull request #12744 from woocommerce/fix/distinct-12689
...
Update wc_terms_clauses query
2017-01-04 10:47:49 +00:00
Mike Jolley
d84a3bc45b
Merge pull request #12751 from bekarice/wc-2-7-fix
...
[2.7] Fix undefined variable notice
2017-01-04 10:47:22 +00:00
Beka Rice
85f06d7d02
[2.7] Fix undefined variable notice
2017-01-03 18:08:37 -05:00
Justin Shreve
94a33b694c
Separate status and post_status in legacy output. status should match get_status exactly.
2017-01-03 14:04:41 -08:00
Manos Psychogyiopoulos
af378a619d
fix undefined qty_ordered variable
2017-01-03 21:40:06 +02:00
Justin Shreve
c560a65e1b
Merge pull request #12742 from jtsternberg/patch-1
...
Add the shortcode name param to shortcodes where it is missing and `shortcode_atts` call where it is missing.
2017-01-03 11:05:48 -08:00
Justin Shreve
3513f50e55
Add tm.meta_value to the DISTINCT list since it is being used in the ORDER BY clause.
2017-01-03 10:43:48 -08:00
Justin Shreve
291a662be1
The WC API returns exclude_product_ids and expiry_date. 2.7 renamed these in the API file, which we should not do until we version the endpoints.
2017-01-03 10:25:36 -08:00
Justin Sternberg
d07d704187
Add the shortcode_atts call to WC_Shortcode_Cart::output
2017-01-03 13:17:04 -05:00
Justin Sternberg
6d21f2170e
Add the shortcode_atts call to WC_Shortcode_Checkout::output
2017-01-03 13:15:26 -05:00
Justin Sternberg
5f92dce1f3
Add the shortcode name param to the woocommerce_order_tracking shortcode
2017-01-03 13:13:27 -05:00
Justin Sternberg
d036123ebf
Add the shortcode name param to the woocommerce_my_account shortcode.
2017-01-03 13:12:12 -05:00
Justin Sternberg
37a387a391
Add the shortcode name param to the WC_Shipping_Legacy_Flat_Rate fee shortcode.
2017-01-03 13:12:00 -05:00
Justin Sternberg
6f5617eb2e
Add the shortcode name param to the fee shortcode.
...
Re: #11447 and #12741
2017-01-03 13:05:43 -05:00
Mike Jolley
fc867c1a58
Return current variations after API update/create
2017-01-03 16:53:49 +00:00
Mike Jolley
31ad64438f
Merge pull request #12737 from bekarice/2-7-undefined-index-fixes
...
Fixes undefined index notices with empty select2
2017-01-03 15:04:21 +00:00
Mike Jolley
2e1e7c0f93
Fix downloads remaining
...
Issues around ‘’ set (unlimited downloads) Fixes #12692
2017-01-03 15:03:55 +00:00
Beka Rice
b8c7d7e771
Fixes undefined index notices with empty select2
2017-01-03 09:16:58 -05:00
Mike Jolley
a46ddc5dd2
Merge branch 'pr/12710'
2017-01-03 11:24:41 +00:00
Mike Jolley
e149509f55
Products can have parents too
2017-01-03 11:24:36 +00:00
Mike Jolley
96876777ef
Merge pull request #12712 from Dartui/master
...
Added email ID to locate core template for email
2017-01-03 11:01:01 +00:00
Mike Jolley
3e10368ad6
Merge pull request #12720 from franticpsyx/delete-vs-trash-object-hooks
...
[2.7] Separate trash and delete CRUD object hooks
2017-01-03 11:00:34 +00:00
Claudio Sanches
c79b4f1fd5
Fixed case for #12645
2017-01-03 00:26:34 -02:00
Claudio Sanches
6d45e531fd
Merge pull request #12734 from corsonr/fix_wizard_tracking_name
...
Updated WooThemes to WooCommerce
2017-01-02 17:09:22 -02:00
corsonr
62c881b3c2
Updated WooThemes to WooCommerce
2017-01-02 17:56:19 +01:00
Jon Surrell
14e5bdcf91
Fix typos
2017-01-02 14:51:56 +01:00
Jon Surrell
4cfc6b4d04
Handle top and bottom bulk actions
2017-01-02 14:42:14 +01:00
Jon Surrell
b4b5c5124a
Refactor WC_Admin_Log_Table_List::prepare_items
...
Extract several methods to simplify structure and flow
2017-01-02 14:42:13 +01:00
akashsonic
202458a1f3
Dynamic add 2 attribute.
...
Add dynamic 2 attributes rows & cols in woocommerce_wp_textarea_input function. User can add dynamic this attributes in text-area field.
2017-01-02 18:01:52 +05:30
Manos Psychogyiopoulos
d250d3f149
distinguish between trash and delete object hooks
2016-12-30 00:22:12 +02:00
Jon Surrell
90ef632fa5
Colorize leveles in db log table
2016-12-29 12:03:59 +01:00
Jon Surrell
a33fac966d
Use plural in multiple log email
2016-12-29 11:58:43 +01:00
Jon Surrell
4cf86ef346
Use constants over settings to configure logger
...
Settings have been removed.
WC_LOG_THRESHOLD and WC_LOG_HANDLER constants have been added.
2016-12-29 11:58:43 +01:00
Jon Surrell
e4681d268b
Remove logging
2016-12-29 11:58:43 +01:00
Jon Surrell
269addd9f8
Rework db log table
...
Change tag from text search to select list.
Flatten and clean up query logic.
Add required methods for source <select>.
2016-12-29 11:58:43 +01:00
Jon Surrell
c633b07f73
Fix style
2016-12-29 11:58:43 +01:00
Jon Surrell
588b1c2267
Format date in log viewer table
2016-12-29 11:58:43 +01:00
Jon Surrell
fbd91fe376
Improve email handler subject
2016-12-29 11:58:43 +01:00
Jon Surrell
4b13e3b053
Do not deprecate WC_Logger::add
2016-12-29 11:58:43 +01:00
Jon Surrell
e4d5886427
Replace log `tag` with log `source`
2016-12-29 11:58:43 +01:00
Jon Surrell
03889f77cc
Update use of deprecated wc_get_log_file_path
2016-12-29 11:58:43 +01:00
Jon Surrell
088fc5cd68
Delay file log write when written too early
...
The function to look up log file paths depends on `wp_hash`, which is pluggable.
Log files cannot be found before `plugins_loaded` action. In case a log is
written to a file before `wp_hash` is available, cache and write on
`plugins_loaded` action.
2016-12-29 11:58:43 +01:00
Jon Surrell
5700043e6d
Deprecate wc_get_log_file_path
...
wc_get_log_file_path moves into `WC_Log_Handler_File` class as a static
method.
Update deprecations and version info.
2016-12-29 11:58:43 +01:00
Jon Surrell
feefabbdf0
Document _legacy context in WC_Log_Handler_File
2016-12-29 11:58:43 +01:00
Jon Surrell
665e8ccfc6
Improve doc comments and access.
2016-12-29 11:58:43 +01:00
Jon Surrell
f908a0181c
Improve deprecation messages for WC_Logger
...
clear and remove *do* have alternatives. They have essentially
been moved to the file handler.
2016-12-29 11:58:43 +01:00
Jon Surrell
6068f681d3
Use 'notice' as level for deprecated WC_Logger::add messages.
...
Notice is the default (and recommended) threshold for production sites. Using
info, which is below notice, would result in ::add messages to be filtered by
default. This would be a confusing experience for users calling the deprecated
function and expecting a log.
2016-12-29 11:58:43 +01:00
Jon Surrell
de076a313e
Fix settings log texts
...
Add 'woocommerce' to __ translated texts.
Improve texts.
2016-12-29 11:58:43 +01:00
Jon Surrell
d4e8bb82e6
Remove new handler arguments from `wc_register_default_log_handler`
2016-12-29 11:58:43 +01:00
Jon Surrell
970a33e182
Cleanup log list table view
...
Format log timestamp.
Add is_valid_level check to $_REQUEST level filter.
General cleanup: formatting, layout, commentary.
2016-12-29 11:58:43 +01: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
2ae1bc1ab2
Protect methods
2016-12-29 11:58:43 +01:00
Jon Surrell
fe837c5113
Aggregate email handler messages (max: 1 email/request/handler)
...
Update emails accordingly.
Update email handler tests.
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
Jon Surrell
5f24eca7e2
Add delete to db log viewer table
...
Clean up some nonce logic.
Use a single <form> containing log table.
2016-12-29 11:58:43 +01:00
Jon Surrell
9ba616b2c1
Return single instance from wc_get_logger
...
Remove class include from wc_get_logger (should be autoloaded).
Add tests for wc_get_logger.
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
81eaa5ae17
Make lot threshold strings translatable
2016-12-29 11:58:43 +01:00
Jon Surrell
080cf8e436
Store log levels as integer representations in database
...
This will allow indexed ordering by severity.
Add WC_Log_Levels::get_severity_level method to translate severity
integers to level strings. The inverse of WC_Log_Levels::get_level_severity.
Add context to tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
78e6cb31a7
Include WC_Log_Handler with other abstracts
2016-12-29 11:58:43 +01:00
Jon Surrell
825d9c9f82
Fix spelling
2016-12-29 11:58:43 +01:00
Jon Surrell
88836b9cca
Drop WP_DEBUG override threshold. Improve logger tests.
...
This may be unexpected behavior for a user, their level is overridden with no
way to change it. It also greatly complicates testing default thresholds.
Dependency on WC_Log_Handler_File has been removed from logger tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
2626c5b3af
Accept explicit handlers and threshold in WC_Logger
2016-12-29 11:58:43 +01:00
Jon Surrell
be38e8f2fe
Add log threshold setting to settings page
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
2945b4755f
Add more information about log levels
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
ae72ce24c4
Drop `var_dump` as safe dump alternative
...
var_dump does not support returning string representation.
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
0f13cca921
Use autoloader for log handlers
2016-12-29 11:58:43 +01:00
Jon Surrell
e2f76bcd54
Fix logs-db redirects
2016-12-29 11:58:42 +01:00
Jon Surrell
c633db9d65
Add woocommerce_default_log_handler setting
...
Adds configuration to settings page
Show status-logs page based on settings (unify logs & database logs)
Register default log handler by default
2016-12-29 11:58:42 +01:00
Jon Surrell
44ec07902d
Add confirmation to db log flush
2016-12-29 11:58:42 +01:00
Jon Surrell
9d80017308
Mark db handler add method as static
2016-12-29 11:58:42 +01:00
Jon Surrell
c945d727d5
Add log flushing to db log viewer
2016-12-29 11:58:42 +01:00
Jon Surrell
5e9d4189fb
Include missing 5 in log level severities
2016-12-29 11:58:42 +01:00
Jon Surrell
e42d2e61fd
Update print_r to use wc_safe_dump
2016-12-29 11:58:42 +01:00
Jon Surrell
691c35e97b
Update logger calls
2016-12-29 11:58:42 +01:00
Jon Surrell
66b0620f7c
remove print_r calls from paypal handler
2016-12-29 11:58:42 +01:00
Jon Surrell
96f9de2106
update paypal gateway logs
2016-12-29 11:58:42 +01:00
Jon Surrell
36201d38ec
Update paypal gateway log method
2016-12-29 11:58:42 +01:00
Jon Surrell
7a3c6bcc0c
Fix phpcs issues
2016-12-29 11:58:42 +01:00
Jon Surrell
915266f967
Add wc_safe_dump function
...
Some "safe" server configurations disable certain functions. `wc_safe_dump` attempts to
safely call a series of alternatives suitable for dumping an expression.
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
d6a6b8771d
Add level views to db log table
2016-12-29 11:58:42 +01:00
Jon Surrell
30fdca65a9
Log viewer via html template
2016-12-29 11:58:42 +01:00
Jon Surrell
bc3f788507
Implements database log viewer
2016-12-29 11:58:42 +01:00
Jon Surrell
f761183363
Update @package for log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
5a9db9738f
Add DB log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
09ea8b074e
Prefer PHP_EOL over "\n"
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
e7d6a9a48b
Rotate logs
...
WC_Log_Handler_File now includes log rotation.
Add and improve tests.
2016-12-29 11:58:42 +01:00
Jon Surrell
2a6c95b490
Prevent possible undefined index warning
2016-12-29 11:58:42 +01:00
Jon Surrell
75c3e5e8c6
Fix phpcs warning
2016-12-29 11:58:42 +01:00
Jon Surrell
9adb64b6b9
Restore log deletion from admin log viewer page
...
WC_Logger no longer controls logging and has no knowledge of files.
Correctly handle `remove_log` action via file log handler.
2016-12-29 11:58:42 +01:00
Jon Surrell
b645fa06b7
Improve logic for legacy `->add` message formatting
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88318220
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
611577320f
Include site name in log email message
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88213040
2016-12-29 11:58:42 +01:00
Jon Surrell
f0508a0fc6
Improve log email message format.
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#pullrequestreview-8895028
2016-12-29 11:58:42 +01:00
Jon Surrell
e4c08aa03a
Remove optional from required log handler context array
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
fe02d44e31
Defauly log file level is DEBUG
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
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
36873e5097
Provide basic messages for email log handler
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
4262a72af6
Use wp_parse_args for default args
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
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
Krzysztof Grabania
3a54b24fa1
Added email ID to locate core template for email
...
This PR adds email id to `woocommerce_locate_core_template` filter. It would be useful for custom emails created by plugins, which have got default email templates.
2016-12-28 20:38:51 +01:00
Manos Psychogyiopoulos
96d7272065
include parent if entering variation id and variations excluded
2016-12-28 16:44:57 +02:00
Manos Psychogyiopoulos
5fa4846f5e
fix inclusion of variation included in product search
2016-12-28 16:41:21 +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
377bbf7767
Merge branch 'master' into read-price-data-caching
2016-12-23 14:08:08 +00:00
Mike Jolley
ceee6c37ca
Change how non-crud props get stored
2016-12-23 14:06:51 +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
Manos Psychogyiopoulos
0d6eae5fca
add 'woocommerce_rest_set_order_item' hook
2016-12-22 17:56:14 +02:00
Mike Jolley
01aba1fd2b
Incorrect inline comments
2016-12-22 15:06:10 +00:00
Mike Jolley
03b581f72e
Refunds API/get_data() missing ID
...
Fixes #12672
2016-12-22 14:52:37 +00:00
Mike Jolley
f3dc355632
Check post data is set
...
Closes #12670
2016-12-22 14:41:39 +00:00
Mike Jolley
8f49724b17
Merge pull request #12674 from franticpsyx/rest-api-set-order-item-meta
...
[2.7] REST order item meta not intercepted
2016-12-22 14:38:39 +00:00