Commit Graph

12191 Commits

Author SHA1 Message Date
Claudio Sanches f61646d1a2 Only return product by SKU if published
Fixes #14480
2017-04-18 21:32:52 -03:00
Claudio Sanches f318ce935c [REST API] Fixed ignored parameters when changing status
Prevent override saved data when updating order status.

Fixes #14359
2017-04-18 21:15:24 -03: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
Claudio Sanches d94f3883da Merge pull request #14497 from woocommerce/fix/14416
Fixed docblocks in REST API v1
2017-04-18 18:43:06 -03:00
Claudio Sanches 58b7b82ee1 Merge pull request #14489 from woocommerce/fix/14469
Remove attribute_ prefix from names in wc_get_formatted_variation
2017-04-18 18:39:21 -03:00
Claudio Sanches d17dd2947b Merge pull request #14485 from woocommerce/update/js-cookie
Update js-cookie to 2.1.4
2017-04-18 18:38:56 -03:00
Claudio Sanches 185ae083a1 Merge pull request #14499 from woocommerce/help-video-updates
Updates & fixes some embed problems
2017-04-18 18:32:16 -03:00
Claudio Sanches e034a69c98 Merge pull request #14486 from woocommerce/fix/14484
Fix call to is_compound method
2017-04-18 18:29:57 -03:00
Claudio Sanches faaac6d67b Merge pull request #14483 from woocommerce/fix/14476
Adds a fallback to queue_transactional_email if background sending is disabled.
2017-04-18 18:29:33 -03:00
Claudio Sanches 086b60a871 Fixed legacy WC_Checkout->posted warning.
WC_Checkout->get_posted_data() is a protected method and third party
integrations should use $_POST.
2017-04-18 18:15:25 -03:00
Claudio Sanches 372898d12f Merge pull request #14502 from woocommerce/fix/refund-plotting
Add refund_lines to report
2017-04-18 18:11:31 -03:00
Mike Jolley add7170f34 Fixes legacy_posted_data access and adds notices if accessed. 2017-04-18 21:55:31 +01:00
Mike Jolley cd7d6cf73d Add refund_lines 2017-04-18 20:29:10 +01:00
Mike Jolley 2a4103d776 Removed the non-functional order total input and combine the recalculation buttons into one working button.
Fixes #14494
2017-04-18 19:44:42 +01:00
Ryan Ray 40da9faa1a Updates & fixes some embed problems
Added a new combined Creating Products video.
Fixes other time stamp embeds that weren’t really working.
2017-04-18 13:18:00 -04:00
Claudio Sanches 81dcd6e79e Fixed docblocks in REST API v1 for #14416 2017-04-18 13:40:10 -03:00
Mike Jolley c454abc787 Remove attribute_ prefix from names in wc_get_formatted_variation
Fixes #14469
2017-04-18 13:08:39 +01:00
Mike Jolley de016c6615 Fix call to is_compound method
Fixes #14484
2017-04-18 12:00:21 +01:00
Mike Jolley b8aade8523 Update js-cookie to 2.1.4 2017-04-18 11:44:51 +01:00
Mike Jolley 6259ee69e9 Adds a fallback to queue_transactional_email if background sending is disabled.
Fixes #14476

After turning off deferred emails by default it seems Subscriptions was
using the ‘default’ value in a filter to check if deferred emails were
enabled or not to hook in these methods.

https://github.com/woocommerce/woocommerce-subscriptions/blob/f87a11cdf0
9bb59aa66f4e86d37592f74193937f/includes/class-wc-subscriptions-email.php
#L339

@thenbrent

This code change adds a fallback so if this method was hooked in
anywhere, and the background emailer was not init or disabled, it will
fallback to regular send-now.
2017-04-18 11:35:37 +01:00
Mike Jolley 16345137e2 Merge pull request #14479 from emgk/fixed-14474
Fixed: get_term() returns objects not array.
2017-04-18 10:36:55 +01:00
Govind Kumar 200cd2de63 Fixed: get_term() returns objects not array. 2017-04-18 13:00:04 +05:30
claudiulodro f21e47f7d0 Update save logic to allow filtering 2017-04-17 14:45:53 -07:00
Claudio Sanches 510630ea05 Merge pull request #14466 from bhubbard/schemal.org-to-https
Updated Schema URLs to use HTTPS
2017-04-17 14:19:34 -03:00
Claudio Sanches 523cd5a0b5 Merge pull request #14443 from woocommerce/fix/14429
wp_insert_term can return an error so handle appropriately in class-wc-product-attribute.php
2017-04-17 13:14:11 -03:00
Claudio Sanches 04f61c73dc Merge pull request #14447 from woocommerce/fix/14362
Make wc_add_order_item pass correct values to woocommerce_new_order_item
2017-04-17 12:54:40 -03:00
Claudio Sanches 5fd29ce0f1 Merge pull request #14449 from woocommerce/add/item-meta-filter
Add woocommerce_order_item_get_formatted_meta_data filter
2017-04-17 12:53:53 -03:00
Mike Jolley cffe326e0e Add variable so shipping calculator is shown on first row
Ref: #14461
2017-04-17 16:35:33 +01:00
Brandon Hubbard fe81c3d74b Updated Schema URLs to use HTTPS 2017-04-17 12:35:21 -03:00
Mike Jolley 1f66a29457 Use smoothHeight
Closes #14448
2017-04-17 16:23:04 +01:00
Mike Jolley 2071e8efee Added has_shipping_address helper method
#14364
2017-04-17 15:15:08 +01:00
Mike Jolley 15fb5fb5ce Add woocommerce_order_item_get_formatted_meta_data filter
2.6 had woocommerce_order_items_meta_display. 3.0 has no filter to
remove meta from display.

Closes #14372
2017-04-17 13:00:05 +01:00
Mike Jolley 887cb8b62c Make wc_add_order_item pass correct values to woocommerce_new_order_item
Fixes #14362
2017-04-17 12:50:27 +01:00
Mike Jolley 4fcada6fe9 wp_insert_term can return an error so handle appropriately in class-wc-product-attribute.php
Fixes #14429
2017-04-17 12:05:36 +01:00
Mike Jolley 71929666ac Merge pull request #14404 from thenbrent/fix_get_meta_returning_deleted_values
Don't return deleted meta in get_meta_data()
2017-04-17 11:38:12 +01:00
Mike Jolley d11337706e Merge pull request #14401 from woocommerce/fix/14389
Use read_downloads in variations
2017-04-17 11:20:14 +01:00
Mike Jolley 9187f3cbb3 Merge pull request #14436 from woocommerce/fix/14398
Fixes the shipping address map URL
2017-04-17 11:12:19 +01:00
Matt Cohen 4aba3d16b0
Adjusts the filter to apply after removing the undesired elements, instead of before. #14398 2017-04-17 12:05:29 +02:00
Matt Cohen dc37646273
Removes the first name, last name, and company from the shipping address map URL. Fixes #14398 2017-04-17 11:15:30 +02:00
rafsuntaskin 6334e95576 UAE state field set to not required, resolves #14409 2017-04-16 14:55:13 +06:00
Mike Jolley d4a8f3c25b fix coupon update 2017-04-15 21:48:22 +01:00
Mike Jolley 1f28b9d0b8 Other object types 2017-04-15 21:18:24 +01:00
Mike Jolley 27c9006f77 Product data store loop protection 2017-04-15 21:04:41 +01:00
Akash Soni e17e7f38bd Change format of product link class.
In this class use capital characters, it's not good formate.

So, I change that and create a new class " woocommerce-loop-product__link ".

The example we use this class for loop product title tag " woocommerce-loop-product__title ".

Thank.
2017-04-16 01:26:38 +05:30
Mike Jolley 5a7dd4938d Merge pull request #14390 from bekarice/fix-php71-notices
Fix PHP 7.1 warnings when manually adding order items
2017-04-15 18:02:03 +01:00
Beka Rice d35621f166 Cast unmodified tax as float as well 2017-04-15 12:01:37 -04:00
claudiulodro 96ed33f227 Use read_downloads in variations 2017-04-14 14:18:08 -07:00
Brent Shepherd 0e40d2c764 Don't return deleted meta
By using $this->get_meta_data() which passed meta through the
WC_Data::filter_null_meta() method, rather than $this->meta_data
which still has null values set.
2017-04-14 13:58:00 -07:00
Claudiu Lodromanean f7c166ca22 Merge pull request #14368 from mdrahul/Fix-14366
Reset ratings count when product is duplicated, ref #14366
2017-04-14 11:40:00 -07:00
AJ Clarke b8e5fc22a2 Localized Photoswipe script 2017-04-14 09:34:05 -07:00
Beka Rice 9de8589c9c Fix PHP 7.1 warnings when manually adding order items 2017-04-14 11:12:53 -04:00
Mike Jolley d695a141ed Variations were not correctly inheriting the parent image or shipping class id 2017-04-14 13:32:14 +01:00
mdrahul b4ca263a4f Reset ratings count when product is duplicated, ref #14366 2017-04-14 11:37:15 +05:30
Claudio Sanches b5090ad629 Merge pull request #14356 from woocommerce/fix/variation-get_attribute
Made the get_attribute method work on variation objects
2017-04-13 13:19:26 -03:00
Mike Jolley a1390125a0 Made the get_attribute method work on variation objects
Fixes #14345
2017-04-13 17:16:46 +01:00
Claudio Sanches 75ecc91d96 Merge pull request #14308 from woocommerce/add/14304
Add backtrace to deprecated message
2017-04-13 12:49:01 -03:00
Claudio Sanches 2879b6ec75 Merge pull request #14353 from woocommerce/fix/itemreviewed-data
Restores itemReviewed structured data for product reviews
2017-04-13 12:37:47 -03:00
Claudio Sanches a0822e6d1f Merge pull request #14352 from woocommerce/fix/grouped-sale-badge
Grouped sale badge fix
2017-04-13 12:36:20 -03:00
Mike Jolley 7bdf8302ec Restores itemReviewed structured data for product reviews 2017-04-13 16:30:06 +01:00
Claudio Sanches ef8136b135 Merge pull request #14344 from woocommerce/remove/defer-email-default
Set default email sending method to not defer
2017-04-13 12:29:34 -03:00
Claudio Sanches 5d5fc57f40 Merge pull request #14342 from woocommerce/fix/14332
Use refund date not order date in refund display
2017-04-13 12:25:08 -03:00
Claudio Sanches f33127b239 Merge pull request #14341 from woocommerce/fix/14333
When checking if the update notice should be shown, compare minor version, not the patch version
2017-04-13 12:24:14 -03:00
Mike Jolley 0e67202ab1 Grouped sale badge fix
Closes #14348
2017-04-13 16:13:48 +01:00
Mike Jolley 77d93a70e0 Set woocommerce_defer_transactional_emails to false by default 2017-04-13 14:22:33 +01:00
Mike Jolley 180f5cd40b send_transactional_email try catch block 2017-04-13 14:22:07 +01:00
Mike Jolley 34227d826f Add backtrace to wc_doing_it_wrong 2017-04-13 14:01:58 +01:00
Mike Jolley 4870506a65 Revert "Add backtrace to deprecated message"
This reverts commit 3e9f74d038.
2017-04-13 13:34:19 +01:00
Mike Jolley 41f7a637cd Use refund date not order date in refund display
Fixes #14332
2017-04-13 13:24:48 +01:00
Mike Jolley 412ddeacda When checking if the update notice should be shown, compare minor version, not the patch version
Fixes #14333
2017-04-13 13:15:49 +01:00
Mike Jolley 8268fc01ad Make sure filters apply on parent_data
Closes #14321
2017-04-13 12:48:21 +01:00
Mike Jolley 01a4f9432f get_tax_class should handle both parent data and unfiltered context to get the tax class before plugin modification. 2017-04-13 12:39:19 +01:00
Mike Jolley f9dd3310b2 Unfiltered context rather than true 2017-04-13 12:38:54 +01:00
Tim Elsass 02de1cc60b Fixing grammar error in msg fixes #14319 2017-04-12 17:03:39 -04:00
Claudio Sanches 078b23a3c2 Revert "Apply distinct to term id only" 2017-04-12 15:54:48 -03:00
Claudio Sanches ad5dad52a2 Merge pull request #14309 from woocommerce/fix/stock-notification-settings
woocommerce_notify_low_stock and woocommerce_notify_no_stock were not hooked up
2017-04-12 14:46:33 -03:00
Mike Jolley 85a67151ff woocommerce_notify_low_stock and woocommerce_notify_no_stock were not hooked up 2017-04-12 18:01:59 +01:00
Mike Jolley 3e9f74d038 Add backtrace to deprecated message 2017-04-12 17:37:59 +01:00
Claudio Sanches c0619f99cd Merge pull request #14306 from woocommerce/fix/file-validation
Only validate file type on relative paths
2017-04-12 12:51:48 -03:00
Mike Jolley de7d8681d2 Only validate file type on relative paths 2017-04-12 16:49:43 +01:00
Claudio Sanches 8151eb1320 Merge pull request #14291 from woocommerce/fix/dupe-cats
Apply distinct to term id only
2017-04-12 12:18:34 -03:00
Claudio Sanches 582999c6c5 Merge pull request #14297 from woocommerce/fix/wc_customer_has_capability
Add $order checks to ensure object is set
2017-04-12 12:09:44 -03:00
Claudio Sanches c5ee1aa00e Merge pull request #14298 from woocommerce/fix/read_downloads
Ensure name and file is set
2017-04-12 12:09:05 -03:00
Mike Jolley 21da0cf71f Ensure name and file is set 2017-04-12 14:11:04 +01:00
Mike Jolley b258e64902 Add $order checks to ensure object is set 2017-04-12 13:46:14 +01:00
Mike Jolley 3fe7df6515 When searching, disable WC sort order
Closes #14292
2017-04-12 12:42:55 +01:00
Mike Jolley fa4049188c Set and restore wp_query so product page functions think it's a real product page
Fixes #14162
2017-04-12 12:33:24 +01:00
Mike Jolley 0628a91cfc Apply distinct to term id only 2017-04-12 11:38:59 +01:00
Claudio Sanches 307a42b37e Merge pull request #14279 from woocommerce/fix/14276
Fix shipping item name update
2017-04-11 18:36:15 -03:00
Mike Jolley 692eceb4cd Fix shipping item name update
Fixes #14276
2017-04-11 21:38:50 +01:00
Claudio Sanches e7acb2918c Merge pull request #14250 from woocommerce/fix/14231
Update notice wording links and styling
2017-04-11 17:34:15 -03:00
Claudio Sanches b122681700 Merge pull request #14268 from woocommerce/fix/background-mails
Works around some cookie hosting issues, and updates the queue more frequently in case of error during email send.
2017-04-11 17:31:49 -03:00
Claudio Sanches 4133f77a31 Merge pull request #14242 from dixitadusara/issue-14227
Incorrect sale dates set when bulk editing variations ref #14227
2017-04-11 17:26:58 -03:00
Claudio Sanches 627d7a8790 Merge pull request #14278 from woocommerce/fix/14209-alt
Variation Attribute Name Fixes (simplified)
2017-04-11 17:25:28 -03:00
Claudio Sanches a1478442d8 Merge pull request #14274 from woocommerce/fix/14239
Ensure object exists
2017-04-11 17:13:55 -03:00
Mike Jolley 5cfed7569c Simplify wc_is_attribute_in_product_name and change separator 2017-04-11 21:12:30 +01:00
Claudio Sanches 610bd3c4db Merge pull request #14272 from woocommerce/fix/14266
GP, GF, KW, LB, MQ, RE and YT does not have states
2017-04-11 17:05:13 -03:00
Claudio Sanches 0df920ebde Merge pull request #14273 from woocommerce/fix/14162
Return if there is no product in woocommerce_upsell_display
2017-04-11 17:03:46 -03:00
Claudio Sanches 3278d9e5d7 Merge pull request #14255 from woocommerce/fix/14163
Download permissions; Convert dates to timestamp on read so UTC is preserved.
2017-04-11 16:51:20 -03:00
Claudio Sanches e027e5b0a1 Merge pull request #14228 from woocommerce/fix/14135
Fix shortcodes formatted with <p> and improved wc_format_content()
2017-04-11 16:14:18 -03:00
Mike Jolley f0f1efcffd Ensure object exists
fixes #14239
2017-04-11 19:29:20 +01:00
Mike Jolley a7e22e3749 Return if there is no product in woocommerce_upsell_display
Fixes #14162
2017-04-11 19:21:13 +01:00
Mike Jolley f5fdd59209 More states
Fixes #14270
2017-04-11 19:10:01 +01:00
Mike Jolley 6ad0f1755d KW does not have states
Fixes #14266
2017-04-11 19:02:23 +01:00
Mike Jolley 7f820c2526 Break if batch is empty
Fixes #14261
2017-04-11 18:59:58 +01:00
Claudio Sanches 6ccdacb0fd Merge pull request #14271 from woocommerce/fix/14259
Apply query_arg filter before generating transient name in product_loop
2017-04-11 14:52:26 -03:00
Claudio Sanches 765179b4da Merge pull request #14253 from woocommerce/add/date-format-filter
woocommerce_admin_order_date_format filter to replace old post_date_column_time
2017-04-11 14:48:35 -03:00
Mike Jolley cb668d42e0 Apply query_arg filter before generating transient name in product_loop
Fixes #14259
2017-04-11 18:47:05 +01:00
Claudio Sanches 4e9febc829 Merge pull request #14269 from woocommerce/fix/14263
Correct variable name
2017-04-11 14:45:25 -03:00
Mike Jolley 9757d2a0ce Correct variable name
Fixes #14263
2017-04-11 18:29:55 +01:00
Mike Jolley 63cd7c25d0 Works around some cookie hosting issues, and updates the queue more frequently in case of error during email send. 2017-04-11 18:23:45 +01:00
Mike Jolley 510adc652c Download permissions; Convert dates to timestamp on read so UTC is preserved.
Fixes #14163
2017-04-11 13:13:03 +01:00
Mike Jolley 899176bee7 woocommerce_update_customer_args filter 2017-04-11 12:47:53 +01:00
Mike Jolley 2f9a9589df woocommerce_admin_order_date_format filter to replace old post_date_column_time 2017-04-11 12:41:30 +01:00
Mike Jolley 2eb9405caa Fix notice styling 2017-04-11 11:40:42 +01:00
Mike Jolley d81493cc52 Merge pull request #14229 from woocommerce/fix/14184
[REST API] Fixed line_items meta type to array on legacy REST API
2017-04-11 10:32:17 +01:00
dixitadusara 1bf13e2b8b Incorrect sale dates set when bulk editing variations ref #14227 2017-04-11 13:04:39 +05:30
Claudio Sanches 6b12559b76 Merge pull request #14164 from RamyTalal/patch-1
Fix notice errors on PHP 7.1
2017-04-11 02:20:27 -03:00
Ramy Talal 36de5db080 Coding standards 2017-04-11 07:19:24 +02:00
Claudio Sanches 4a5a93f629 Merge pull request #14107 from woocommerce/fix/rest-api-legacy-v3-variations
[REST API] Fixed missing $variations variable in legacy v3
2017-04-10 20:19:43 -03:00
Claudio Sanches 5c92f9141b [REST API] Fixed line_items meta type to array on legacy REST API
Closes #14184
2017-04-10 19:57:35 -03:00
Claudio Sanches 5eab267ec1 Fixed shortcodes formatted with <p> and improved wc_format_content()
This fix the shortcode issue, stop extra sanitization and allow use
smilies, attachments, embeds and Jetpack markdown.

Closes #14135
2017-04-10 19:21:22 -03:00
Claudio Sanches 702d72f173 Merge pull request #14225 from woocommerce/fix/14213
Use correct thumbnail for variation images in gallery
2017-04-10 19:13:09 -03:00
Mike Jolley 7274c14591 Use correct thumbnail for variation images in gallery
Fixes #14213
2017-04-10 23:02:53 +01:00
Claudio Sanches 394532c9ab Merge pull request #14199 from woocommerce/add/visibility-terms-debug-14147
Add product visibility terms to system status report to help debug
2017-04-10 18:52:10 -03:00
Claudio Sanches 8bd7e2de4a Merge pull request #14188 from woocommerce/fix/14186
Correct calls to wc_reduce_stock_levels in PayPal and Simplify gateways
2017-04-10 18:50:51 -03:00
Claudio Sanches 2acc956254 Merge pull request #14206 from woocommerce/fix/14118
__clone meta correctly on object clone
2017-04-10 18:49:49 -03:00
Claudio Sanches 47a6741707 Merge pull request #14221 from woocommerce/fix/14216
Do not duplicate grouped products, only variations
2017-04-10 18:49:28 -03:00
Claudio Sanches 0b7f990dae Merge pull request #14219 from woocommerce/fix/14211
Fix backwards compat logic in enable_guest_checkout
2017-04-10 18:48:16 -03:00
Claudiu Lodromanean 715656921d wc_is_attribute_in_product_name 2017-04-10 14:35:16 -07:00
Claudio Sanches b79711b54c Merge pull request #14141 from rellect/copy_suffix
Add back the (Copy) suffix for duplicated products
2017-04-10 18:16:09 -03:00
Mike Jolley bcd39e9a79 Pass id not object to wc_reduce_stock_levels 2017-04-10 21:55:17 +01:00
Mike Jolley 76d962b606 since 2017-04-10 21:52:06 +01:00
Mike Jolley ade147ccc2 Do not duplicate grouped products, only variations
Fixes #14216
2017-04-10 21:45:57 +01:00
Mike Jolley 3cf50c60f6 Fix backwards compat logic in enable_guest_checkout
Fixes #14211
2017-04-10 21:18:49 +01:00
Claudiu Lodromanean 903b176b99 Attribute title tweaks 2017-04-10 13:16:58 -07:00
Claudio Sanches 043265101f Merge pull request #14142 from rellect/unset_set_on_duplicating
Reset slug when duplicating product - fix #14128
2017-04-10 16:28:50 -03:00
Mike Jolley 12dbc059c3 Update add_to_cart_text for external products to include default
Fixes #14181
2017-04-10 17:54:39 +01:00
Mike Jolley e14d85d0a3 __clone meta correctly on object clone
Fixes #14118
2017-04-10 17:12:17 +01:00
Claudio Sanches e6d68c7897 Merge pull request #14198 from woocommerce/fix/14158
Make get_cross_sells unique.
2017-04-10 12:55:25 -03:00
Mike Jolley 7d5efe4b78 Add product visibility terms to system status report to help debug
Closes #14147
2017-04-10 15:51:14 +01:00
Mike Jolley 95397188d5 Make get_cross_sells unique.
Fixes #14158
2017-04-10 15:20:41 +01:00
Mike Jolley 243b7a0d3f Exclude location meta from setters 2017-04-10 12:16:25 +01:00
Mike Jolley 8fa73602eb Correct calls to wc_reduce_stock_levels in PayPal and Simplify gateways
Fixes #14186
2017-04-10 11:56:52 +01:00
Ramy Talal 6b29066d3e Fix notice errors on PHP 7.1 2017-04-09 13:45:46 +02:00
refael iliaguyev 6ee1fb0a62 set empty string as slug 2017-04-08 18:14:34 +03:00
refael iliaguyev 5add77c201 add 'woocommerce' text domain 2017-04-08 15:59:01 +03:00
refael iliaguyev 3be5f80ee7 unset slug - fix #14128 2017-04-08 13:39:06 +03:00
refael iliaguyev 3af7452370 Add back the (Copy) suffix for duplicated products 2017-04-08 13:16:42 +03:00
Govind Kumar 2ea79cc5ed Fixed issue #14124 2017-04-07 19:14:10 +05:30
Claudio Sanches 708df27719 Merge pull request #14117 from woocommerce/fix/14108
If variation tax class meta is not set, it should be 'parent' to support 2.6 data
2017-04-07 13:29:40 -03:00
Mike Jolley 7418b9f8b8 If variation tax class meta is not set, it should be 'parent' to support 2.6 data
Fixes #14108
2017-04-07 17:13:59 +01:00
Claudio Sanches 51c00cce09 Merge pull request #14099 from dixitadusara/issue-14089B
Modified suggestion of Invalid argument supplied for foreach ref #14089
2017-04-07 12:33:01 -03:00
Claudio Sanches ef6895fd56 Merge pull request #14113 from woocommerce/fix/product-object-checks
Fix/product object checks
2017-04-07 12:31:28 -03:00
Mike Jolley e14eb70814 Skip reports if no product is found 2017-04-07 16:08:06 +01:00
Mike Jolley 84c96046f0 Check objects are not false/null 2017-04-07 16:01:51 +01:00
Claudio Sanches 8de0bb0a46 [REST API] Fixed missing $variations variable in legacy v3 2017-04-07 10:31:28 -03:00
Claudio Sanches 731c9cfdd9 Merge pull request #14097 from woocommerce/fix/14085
Ensure meta_value has valid keys in read_attributes
2017-04-07 09:19:25 -03:00
Claudio Sanches c42505f7e5 Merge pull request #14096 from woocommerce/fix/14087
Add missing woocommerce_cross_sells_columns filter.
2017-04-07 09:18:54 -03:00
Mike Jolley 4f412678bd Ensure meta_value has valid keys in read_attributes
Fixes #14085
2017-04-07 10:59:59 +01:00
dixitadusara e527b6608c modified suggestion of Invalid argument supplied for foreach ref #14089 2017-04-07 15:27:52 +05:30
Mike Jolley 078dfb4ffa Add missing woocommerce_cross_sells_columns filter.
Closes #14087
2017-04-07 10:35:42 +01:00
Gareth 425752d8ff Updates product title in product loop commenting
Commenting indicated the product title in the product loop was enclosed in an `<h3>`, when the code was actually printing an `<h2>`.
2017-04-07 09:55:48 +02:00
dixitadusara 3ba9063d3d Invalid argument supplied for foreach - class-wc-product-data-store-cpt.php ref #14089 2017-04-07 13:24:34 +05:30
Claudio Sanches 464ea7f01d Fixed ccoding standards 2017-04-06 19:46:06 -03:00
Claudio Sanches c4adec3e1a Removed translatable function used for variables 2017-04-06 19:45:59 -03:00
Claudiu Lodromanean 19361127a9 Array filter before saving 2017-04-06 14:47:22 -07:00
Claudio Sanches 7f18e9ef83 Merge pull request #14076 from woocommerce/fix/remove-empty-items
filter items which are false
2017-04-06 18:21:14 -03:00
Claudio Sanches c2830af5e1 Merge pull request #14071 from woocommerce/fix/14068
Fix variation category restriction and limit to x uses
2017-04-06 18:15:45 -03:00
Mike Jolley fbcb46b273 filter items which are false
https://wordpress.org/support/topic/call-to-a-member-function-is_type-cl
ass-wc-order-php-on-line-1305/
2017-04-06 22:15:42 +01:00
Claudio Sanches 56b8a4661a Merge pull request #14074 from woocommerce/fix/14067
Fixed sanitization of order items meta data
2017-04-06 18:14:34 -03:00
Claudio Sanches ee76842edb Merge pull request #14075 from woocommerce/fix/14072
Remove date on dupe
2017-04-06 18:13:26 -03:00
Mike Jolley c1b670eaa6 Remove date on dupe 2017-04-06 22:11:00 +01:00
Claudio Sanches af7f271de1 Fixed sanitization of order items meta data
Closes #14067
2017-04-06 17:58:24 -03:00
Mike Jolley 1b5cad3d78 Fix variation category restriction and limit to x uses
Fixes #14068
2017-04-06 21:51:11 +01:00
Claudiu Lodromanean 94814a0b03 Dont throw exceptions when reading 2017-04-06 13:39:36 -07:00
rafsuntaskin ac5de585e5 added bulk variation update for stock status, resolves #14046 2017-04-07 02:11:04 +06:00
Mike Jolley d8bc209cab read_product_data does not exist 2017-04-06 20:55:51 +01:00
Claudio Sanches 14572c8d80 Merge pull request #13991 from woocommerce/fix/13928
When setting props, exclude deprecated ones
2017-04-06 16:20:34 -03:00
Mike Jolley 2877752e1f array_flip 2017-04-06 20:18:14 +01:00
Claudio Sanches 0529e4efab Merge pull request #14026 from woocommerce/fix/13978
Fix variable stock syncing
2017-04-06 16:06:26 -03:00
Mike Jolley 8f2287be12 Use get_children for comparison 2017-04-06 19:47:22 +01:00
Mike Jolley 5701b1f7e2 Get cross sells from parent
fixes #14054
2017-04-06 19:01:57 +01:00
Claudio Sanches abc48f1601 Correct class version and author 2017-04-06 14:47:56 -03:00
Claudio Sanches fa40e7b205 Merge pull request #14035 from woocommerce/fix/13963
Background Emailer instead of just CRON
2017-04-06 14:47:15 -03:00
Claudio Sanches 2ff763a976 Merge pull request #14042 from franticpsyx/order-again-meta-std-class-props
[3.0] Fix non-existing stdClass props in WC_Form_Handler::order_again
2017-04-06 14:42:14 -03:00
Claudio Sanches 5ca593f782 Merge pull request #14048 from woocommerce/fix/13949
Fix variation description formatting in frontend and REST API v2
2017-04-06 14:42:01 -03:00
Claudio Sanches b16d3a091c Merge pull request #14049 from woocommerce/fix/variation-description-sanitization
Removed extra variation description extra sanitization
2017-04-06 14:41:41 -03:00
Claudio Sanches 42ca7bda3d Merge pull request #13989 from woocommerce/fix/product-meta-save_post
Fix saving meta when using `save_post`.
2017-04-06 14:38:16 -03:00
Claudio Sanches cdab73af3c Merge pull request #14051 from woocommerce/fix/no-base-permalinks
Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty
2017-04-06 14:29:45 -03:00
Claudio Sanches 5f9a215318 Merge pull request #14052 from woocommerce/fix/variation-tax-status
Pull tax status from parent since there is no UI to set at variation level
2017-04-06 14:29:28 -03:00
Mike Jolley 0348a4751e Use placeholder value from backend if not set 2017-04-06 18:19:07 +01:00
Mike Jolley fd3e656912 Pull tax status from parent since there is no UI to set at variation level 2017-04-06 17:54:34 +01:00
Mike Jolley 56eb3c4da3 Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty 2017-04-06 17:50:04 +01:00
Claudio Sanches 4032167f6c Removed extra variation description extra sanitization 2017-04-06 13:21:34 -03:00
Claudio Sanches fc9ba64e50 Properly format variation description in REST API v2 2017-04-06 13:02:51 -03:00
Claudio Sanches f3c2e6c5f6 Improved wc_format_content() formatting and added sanitization 2017-04-06 13:01:35 -03:00
Claudio Sanches 567a551d83 Fixed shortcode render for variations and backwards compatibility
Fixes #13949
2017-04-06 13:00:02 -03:00
Claudio Sanches b059851882 Merge pull request #14001 from woocommerce/fix/13980
Allow search customers by ID in admin customer ajax search
2017-04-06 12:01:39 -03:00
Claudio Sanches 3fff61ea4e Merge pull request #14043 from woocommerce/fix/missing-product-type-field
if product type field is not posted, we should maintain existing type, not change to simple
2017-04-06 11:58:55 -03:00
Mike Jolley 82cdf65c04 if product type field is not posted, we should maintain existing type, not change to simple 2017-04-06 15:56:55 +01:00
Manos Psychogyiopoulos e18d9741a4 Fix non-existing stdClass props 2017-04-06 17:42:51 +03:00
Claudio Sanches f3156fb5f4 Merge pull request #13981 from woocommerce/fix/13936
[REST API] Fixed attributes while trying to save variations
2017-04-06 11:38:23 -03:00
Claudio Sanches 83135c24c1 Merge pull request #13971 from woocommerce/fix/13966
Ensure gateways are loaded in emails
2017-04-06 11:38:09 -03:00
Claudio Sanches 966fd0e411 Merge pull request #14037 from woocommerce/fix/legacy-sync
Only call sync if callable
2017-04-06 10:54:58 -03:00
Claudio Sanches 6c1a38d637 Merge pull request #13975 from woocommerce/fix/13943
Compare to the order item title instead of variation title
2017-04-06 10:36:36 -03:00
Claudio Sanches 550f7b4028 Merge pull request #13986 from woocommerce/fix/13954
Fixed "singular" and "plural" parameters of WP_List_Table instances
2017-04-06 10:33:43 -03:00
Claudio Sanches 9a219b71da Merge pull request #14036 from woocommerce/fix/14032
Make sure we have a prefix for strstr
2017-04-06 10:25:46 -03:00
Mike Jolley 261ae0ebda Only call sync if callable 2017-04-06 14:18:17 +01:00
Claudio Sanches 03004bdd49 Merge pull request #14009 from woocommerce/fix/14006
When forcing shipping to billing, set the shipping fields in the order itself
2017-04-06 10:17:54 -03:00
Claudio Sanches 01c425398c Merge pull request #14012 from woocommerce/fix/13930-alt
Hide structured data in hidden element
2017-04-06 10:14:30 -03:00
Claudio Sanches f2b90d6163 Merge pull request #14014 from woocommerce/fix/13906
Set session data only if the value is empty in customer object. Prevents session data overwriting customer data on login.
2017-04-06 10:12:54 -03:00
Claudio Sanches 03e05cab1c Merge pull request #14017 from woocommerce/fix/14008
Allow variation image to be unset
2017-04-06 10:12:12 -03:00
Mike Jolley 822412d03c Make sure we have a prefix for strstr
Closes #14032
2017-04-06 14:11:00 +01:00
Claudio Sanches ddf188a61e Merge pull request #14018 from woocommerce/fix/13968
Show a sale price on variable products if on sale and all prices are the same
2017-04-06 10:10:49 -03:00
Mike Jolley 288026ca9f Background Emailer instead of just CRON 2017-04-06 13:46:07 +01:00
Mike Jolley bf09c7df82 Ensure reg prices are the same 2017-04-06 13:08:18 +01:00
Mike Jolley 36e9b73ef3 Make sure we have a product before generating JSON 2017-04-06 12:40:53 +01:00
Mike Jolley a7a896008c Fix up the child_is_in_stock function 2017-04-06 12:26:19 +01:00
Mike Jolley 7e90a318cd On variable save, sync with children and avoid transient cache 2017-04-06 12:26:10 +01:00
Mike Jolley 47411f7397 wc_deferred_product_sync queue function 2017-04-06 12:25:54 +01:00
Mike Jolley fe42b2565c Defer variation parent sync to shutdown rather than cron 2017-04-06 12:25:34 +01:00
Mike Jolley 93689a8107 Show a sale price on variable products if on sale and all prices are the same
Fixes #13968
2017-04-06 11:01:20 +01:00
Mike Jolley eea6867ac9 Allow variation image to be unset
@claudiosanches is this correct way?

Fixes #14008
2017-04-06 10:41:09 +01:00
Mike Jolley d570a81241 Set session data only if the value is empty in customer object. Prevents session data overwriting customer data on login.
Fixes #13906
2017-04-06 10:28:32 +01:00
Mike Jolley 52939e800c Hide structured data in hidden element 2017-04-06 10:06:21 +01:00
Mike Jolley 8614a7922d When forcing shipping to billing, set the shipping fields in the order itself
Fixes #14006
2017-04-06 09:50:34 +01:00
Claudio Sanches 2ffb2e8853 Allow search customers by ID in admin customer ajax search
Closes #13980
2017-04-06 02:19:12 -03:00
Gregory Karpinsky 37c7e2a615 Docblock fix
`get_availability` returns array of strings
2017-04-06 00:32:36 -04:00
Claudio Sanches 168a4a3096 Merge pull request #13909 from woocommerce/fix/prevent-only-color-picker-to-flip
Prevent RTL flip only color picker inputs
2017-04-05 21:21:38 -03:00
Claudio Sanches 4bb2c070ae Merge pull request #13900 from woocommerce/fix/rest-api-remove-extra-taxes-params
[REST API] Removed extra taxes params.
2017-04-05 21:18:09 -03:00
Claudio Sanches 4b2481f9f2 Merge pull request #13994 from woocommerce/fix/cross-sell-columns
Cross sells were not showing first last classes since columns (2) was not being set
2017-04-05 20:33:31 -03:00
Claudio Sanches b3937bcc4d Merge pull request #13995 from woocommerce/fix/13902
Hash querystring is v not version. Stops infinite loop.
2017-04-05 20:33:00 -03:00
Mike Jolley 8333d75703 Hash querystring is v not version. Stops infinite loop.
Fixes #13902
2017-04-05 23:42:33 +01:00
Mike Jolley e16119f687 Cross sells were not showing first last classes since columns (2) was not being set 2017-04-05 23:28:13 +01:00
Mike Jolley 70778abade When setting props, exclude deprecated ones
Fixes #13928
2017-04-05 23:16:45 +01:00
Justin Shreve 15bf1da7d5 Call save_meta_data before wp_update_post for data stores that use it, and refresh meta cache after. 2017-04-05 14:39:41 -07:00
Claudio Sanches 5bcace31fc Fixed "singular" and "plural" parameters of WP_List_Table instances
Both should be slugs and not translatable.

Fixes #13954
2017-04-05 18:15:40 -03:00
Claudiu Lodromanean c02cee595e Add missing download_id param 2017-04-05 13:37:42 -07:00
Claudio Sanches 87199d0627 [REST API] Fixed attributes while trying to save variations
Closes #13936
2017-04-05 17:03:05 -03:00
Mike Jolley 359213d720 Fix direction 2017-04-05 20:25:21 +01:00
Mike Jolley 0035afc5a0 Make sure we have number > 0 so all variations are not deleted 2017-04-05 20:22:05 +01:00
Mike Jolley a6080aa4a9 Pass ID, not the product object 2017-04-05 20:21:33 +01:00
Claudiu Lodromanean 523d39578a Compare to the order item title instead of variation title 2017-04-05 12:03:18 -07:00
Claudio Sanches e2881d5af1 Ensure gateways are loaded in emails
Fix missing bank details in emails

closes #13966
2017-04-05 15:50:40 -03:00
Claudio Sanches f250cac8d1 Merge pull request #13967 from woocommerce/fix/13933
Use parent settings for determining if variations are sold individually.
2017-04-05 15:33:17 -03:00
Claudiu Lodromanean 5389844a1b Use parent data for sold_individually 2017-04-05 11:02:26 -07:00
Mike Jolley 27b35c0515 Using WPDB is quicker than wp_update_post 2017-04-05 18:40:59 +01:00
Claudio Sanches 6135aa8175 Merge pull request #13927 from woocommerce/fix/13921
Fallback to home URL if no shop page is set for system status security check.
2017-04-05 14:29:16 -03:00
Claudio Sanches 67274e8c2c Make sure that ID exists 2017-04-05 14:23:50 -03:00
Claudio Sanches 7a34e4a176 Merge pull request #13959 from woocommerce/fix/customer-set-defaults
Wrap in try catch so WC_Data_Exceptions are caught on bad email.
2017-04-05 14:20:56 -03:00
Claudio Sanches 1590ba135b Merge pull request #13961 from woocommerce/fix/system-status-hook
Add back removed filter for system status rows.
2017-04-05 14:11:40 -03:00
Claudiu Lodromanean f4a04c088b Merge pull request #13958 from woocommerce/fix/remove-legacy-clear
Removed extra clear parameter from addresses
2017-04-05 09:41:08 -07:00
Claudiu Lodromanean 87b71b0653 Merge pull request #13941 from woocommerce/fix/hook-deprecated-function-calls
Use wc_deprecated_function so notices are not triggered on ajax requests
2017-04-05 09:36:01 -07:00
Claudiu Lodromanean 691441f87f Merge pull request #13935 from woocommerce/fix/13920
wc_get_object_terms should check it's not an error object
2017-04-05 09:30:02 -07:00
Claudiu Lodromanean e1b9165439 Merge pull request #13931 from woocommerce/fix/register-admin-settings
If The $object is not really an object, don't continue. It's invalid.
2017-04-05 09:24:37 -07:00
Justin Shreve 6b6f48e7dc Prior to 3.0 there was a woocommerce_debug_posting filter that could be used to add rows to the environment section of the system status page. It was removed. This PR adds it back as woocommerce_system_status_environment_rows and aliases/deprecates the old one. 2017-04-05 09:13:20 -07:00
Mike Jolley ab4c921bd1 Wrap in try catch so WC_Data_Exceptions are caught on bad email. 2017-04-05 16:36:28 +01:00
Claudio Sanches 5a7af35d46 Removed extra clear parameter from addresses 2017-04-05 11:57:39 -03:00
Claudio Sanches f1df9e8dd9 Merge pull request #13955 from psiico/patch-1
Update class-wc-coupon.php
2017-04-05 11:52:23 -03:00
Claudio Sanches 2e7393d156 Merge pull request #13899 from woocommerce/fix/missing-array-declaration
Fixed missing array declaration
2017-04-05 11:49:10 -03:00
Ivo Santos b7dfc10dee Update class-wc-coupon.php
Updated get_amount() method description.
2017-04-05 16:32:02 +02:00
Mike Jolley e66efc1dcc Use wc_deprecated_function so notices are not triggered on ajax requests 2017-04-05 13:06:43 +01:00
Mike Jolley 4ad05dfa83 wc_get_object_terms should check it's not an error object
Fixes #13920
2017-04-05 12:06:37 +01:00
Mike Jolley 5770fb132e If The $object is not really an object, don't continue. It's invalid. 2017-04-05 11:10:27 +01:00
Mike Jolley 811d59feec Fallback to home URL if no shop page is set for system status security check.
Fixes #13921
2017-04-05 10:03:41 +01:00
Claudio Sanches 3920a12d71 Prevent RTL flip only color picker inputs
Fixes #13723
2017-04-04 17:27:11 -03:00
Mike Jolley b251973a66 Don't filter hidden grouped products
Fixes #13903
2017-04-04 20:33:36 +01:00
Claudio Sanches c88941a424 Removed extra taxes params.
Search, include and exclude are not handled by the REST API.
2017-04-04 14:54:01 -03:00
Claudio Sanches cf954fac1e Fixed missing array declaration 2017-04-04 14:53:05 -03:00
Claudio Sanches d881bf0500 Coding standards and changelog for #13867 2017-04-04 11:40:02 -03:00
Claudio Sanches faf0104b49 Merge pull request #13260 from JeroenSormani/product-data-tab-priority
Add 'priority' support to product data tabs
2017-04-04 11:33:48 -03:00
Claudio Sanches 620a92d6fd Merge pull request #13867 from woocommerce/fix/13788
Updated Emogrifier to 1.2.0
2017-04-04 11:30:47 -03:00
Claudio Sanches ca23ea9ef2 Merge pull request #13815 from woocommerce/fix-13813-1
Include WooCommerce endpoints to customize nav menu setting
2017-04-04 11:03:26 -03:00
Mike Jolley b2e4052e3b Stock qty should be wrapped in wc_stock_amount 2017-04-04 13:35:31 +01:00
Mike Jolley d917856378 Validate status if object_read
#13891
2017-04-04 12:39:35 +01:00
Mike Jolley 505813403e @used-by WC_Order::set_status comment
#13891
2017-04-04 11:52:54 +01:00
Claudio Sanches c89cb04194 Fixed api version compare for #13872 2017-04-03 21:41:00 -03:00
Mike Jolley c844ec6487 Merge pull request #13817 from woocommerce/improvement-13716
Allow setup wizard filtering
2017-04-03 19:26:39 +01:00
Claudiu Lodromanean ef7dbc75a1 bump down version number 2017-04-03 11:24:01 -07:00
Claudio Sanches 88445f4dd4 Merge pull request #13888 from woocommerce/fix-13887
Timezone can be + 30 mins
2017-04-03 15:22:05 -03:00
Mike Jolley 71ce5b85bc Merge pull request #13884 from woocommerce/fix-13875-13877
Private and variable product fixes
2017-04-03 19:16:35 +01:00
Mike Jolley bf601e7b23 docblock 2017-04-03 19:14:55 +01:00
Claudiu Lodromanean 82c3f93340 Change to single quotes 2017-04-03 09:54:24 -07:00
Mike Jolley 6b11bfbff0 Timezone can be + 30 mins
Fixes #13887
2017-04-03 16:01:18 +01:00
Mike Jolley 0a96f17747 Flip orderby 2017-04-03 12:12:13 +01:00
Mike Jolley c06fdc2e2e If product has_options, don't show qty in grouped product add to cart form
Fixes #13875
2017-04-03 12:05:28 +01:00
Mike Jolley 8598f82c8a If user can edit private products, search them
Fixes #13877
2017-04-03 12:04:59 +01:00
Mike Jolley 31cd2dcb90 Merge pull request #13853 from woocommerce/crud-security-hardening
CRUD security/hardening
2017-04-03 11:09:38 +01:00
Mike Jolley 75f79b3279 Se 20y limit on datepicker too 2017-04-03 10:46:37 +01:00
Mike Jolley da86e02331 Merge pull request #13872 from woocommerce/fix/missing-rest-api-v2-webhooks-settings
Include missing REST API v2 from webhooks options.
2017-04-03 09:51:31 +01:00
Claudio Sanches 014262c0cc Fixed returned data from WC_AJAX::get_customer_details() 2017-04-03 03:00:07 -03:00
Claudio Sanches 1fe791d7d8 Fixed WC_AJAX::get_customer_details() filter deprecated message 2017-04-03 02:59:07 -03:00
Claudio Sanches 984edf07d2 Missing period 2017-04-02 03:27:58 -03:00
Claudio Sanches 5b51b915f6 Fixed a typo 2017-04-02 03:24:52 -03:00
Claudio Sanches 4922e17876 Include missing REST API v2 from webhooks options. 2017-04-02 03:07:09 -03:00
Claudio Sanches f7db744a90 Updated Emogrifier to 1.2.0
Code changed to support PHP 5.2.

Used PHPCompatibility tool to help fix backwards compatibility.

Closes #13788
2017-03-31 17:19:35 -03:00
Claudiu Lodromanean 955f20be80 Do custom buttons before Cancel and Save buttons 2017-03-31 11:28:00 -07:00
Claudiu Lodromanean 0d84865b0f Pass wizard around 2017-03-31 10:32:19 -07:00
Mike Jolley 999a597055 Escaping in search orders 2017-03-31 17:14:08 +01:00
Claudio Sanches 5aaf23f8a5 Merge pull request #13845 from woocommerce/fix-13842
Dont redirect lost password on multisite global pages
2017-03-31 13:05:43 -03:00
Claudio Sanches cbca4dd5db Merge pull request #13856 from woocommerce/fix-13849
use term_taxonomy_id in upgrade routine
2017-03-31 12:17:54 -03:00
Mike Jolley 0c6c67ba6a Merge pull request #13855 from woocommerce/fix-13848
Only set dates if set/not null
2017-03-31 15:51:33 +01:00
Mike Jolley a2e60c51e3 use term_taxonomy_id in upgrade routine
Fixes #13849
2017-03-31 12:42:07 +01:00
Mike Jolley 8a201b64c5 Only set dates if set/not null
Fixes #13848
2017-03-31 12:38:18 +01:00
Mike Jolley 58040c94ae Increase order key length to 22 to support 2.6
Fixes #13850
2017-03-31 12:29:19 +01:00
Mike Jolley 14802a0307 Remove double unserialization 2017-03-31 12:10:20 +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 12e28a83f3 WC_Product_Variable_Data_Store_CPT::read_variation_attributes() cast to int 2017-03-31 11:37:12 +01:00
Mike Jolley 0d1cfe6fd2 Use prepare on `type` in payment token data store 2017-03-31 11:22:47 +01:00
Mike Jolley f1a699c259 Cleanup 2017-03-31 11:18:22 +01:00
Mike Jolley a443419006 remove extract and sanitize orderby against whitelist 2017-03-31 11:15:55 +01:00
Claudiu Lodromanean 4bae06b198 Dont redirect lost password on multisite global pages 2017-03-30 10:53:03 -07:00
Mike Jolley 5d62d3c844 Merge pull request #13844 from woocommerce/fix-13839
[REST API] Ignore 0 category while querying products
2017-03-30 18:06:04 +01:00
Claudio Sanches be8036869e [REST API] Ignore 0 category while querying products 2017-03-30 13:43:59 -03:00
Mike Jolley c83e725f99 Merge pull request #13835 from woocommerce/fix-13829
Update product rating counts after adding a rating
2017-03-30 11:16:40 +01:00
Claudiu Lodromanean 38cd9b4df7 Update product rating counts after adding a rating 2017-03-29 14:51:33 -07:00
Claudio Sanches 61ec9b3e51 Updated version to 3.1.0 2017-03-29 17:56:03 -03:00
Claudio Sanches 84e428abd3 Use correct attribute type label in attributes admin screen
This allow use a translatable label for attribute type instead of
forcing English for everybody.
2017-03-29 17:50:09 -03:00
Claudiu Lodromanean 27e1cffa30 Better way of passing on the next stepg 2017-03-29 11:22:55 -07:00
Claudio Sanches bbd54cc15f Merge pull request #13816 from woocommerce/fix-13813-2
Fixed titles and items from WC_Admin_Menus::nav_menu_links()
2017-03-29 14:27:38 -03:00
Mike Jolley 4e58d40404 Merge pull request #13814 from woocommerce/fix-13813
Load custom "WooCommerce endpoint" metabox only in Appearance > Menus.
2017-03-29 18:20:52 +01:00
Claudio Sanches e4a6882eaf Merge pull request #13825 from woocommerce/fix-13822
Filter empty tax values
2017-03-29 13:40:56 -03:00
Mike Jolley 399c141377 Fix slug updating in CRUD
Fixes #13824
2017-03-29 13:41:23 +01:00
Mike Jolley 82ffd9894f Filter empty tax values
Fixes #13822
2017-03-29 13:13:00 +01:00
Mike Jolley df13658dab docblock correction
Closes #13818
2017-03-29 11:47:37 +01:00
corsonr 0608eaf11a Fix 13820
Add the “description” class to `.cancel_sale_schedule` so that the
“cancel” link gets aligned properly with a margin left of 7 pixels.
2017-03-29 10:01:45 +02:00
Claudiu Lodromanean da0b048788 Allow setup wizard filtering 2017-03-28 14:45:12 -07:00
Claudio Sanches ffc3f0f0fd Merge pull request #13804 from woocommerce/fix-13790
[REST API] Fixed all products v1 query parameters.
2017-03-28 18:37:23 -03:00
Claudio Sanches 987fff3775 Fixed titles and items from WC_Admin_Menus::nav_menu_links() 2017-03-28 18:33:06 -03:00
Claudio Sanches 989d60a60a Include WooCommerce endpoints to customize nav menu setting 2017-03-28 18:07:00 -03:00
Claudio Sanches 6d38a74283 Merge pull request #13811 from woocommerce/fix-13807
Define default $discount_amount_html in wc_cart_totals_coupon_html()
2017-03-28 17:06:37 -03:00
Claudio Sanches 0964847e28 Load custom "WooCommerce endpoint" metabox only in Appearance > Menus.
Closes #13813
2017-03-28 16:06:26 -03:00
Claudio Sanches 1c369e41e0 Merge pull request #13810 from woocommerce/fix-typo
Fix typo
2017-03-28 15:22:45 -03:00
Claudio Sanches 29d86dfea6 Merge pull request #13812 from woocommerce/fix-13803
Use new_* hooks instead of created_*
2017-03-28 15:19:41 -03:00
Claudio Sanches fdbd442e05 Define default $discount_amount_html in wc_cart_totals_coupon_html()
Closes #13807
2017-03-28 15:10:05 -03:00
Claudiu Lodromanean 28726570bf Use new_* hooks instead of created_* 2017-03-28 11:05:45 -07:00
Akeda Bagus 0b416439c8
Fixed all typos of all files in includes/ directory.
Scanning and fixing were done automatically by codespell,
https://github.com/lucasdemarchi/codespell.
2017-03-29 00:58:51 +07:00
Michael Pretty 6660379f19 Cleanup of PHPDoc for interfaces, fixes #13808 2017-03-28 13:52:32 -04:00
Claudio Sanches afccb22f58 [REST API] Fixed all products v1 query parameters 2017-03-28 14:44:11 -03:00
Claudio Sanches 54c353d67f [REST API] Fixed taxonomies query arguments.
Fixed the follow error:

PHP Warning: explode() expects parameter 2 to be string, array given in
includes/api/v1/class-wc-rest-products-controller.php on line 156

Error caused since terms are sanitized by wp_parse_id_list() that
already creates an array.

Closes #13790
2017-03-28 14:34:41 -03:00
Mike Jolley 3c008b8a56 Check for null 2017-03-28 17:26:58 +01:00
Mike Jolley ae7c4e713b Merge pull request #13793 from woocommerce/fix-13785
Load values only when not-empty/set
2017-03-28 17:00:32 +01:00
Mike Jolley 9d9c9cdc9e Merge pull request #13772 from crodas/order_item_should_check_if_there_is_any_change
Do not update order items every time if nothing changed
2017-03-28 15:28:40 +01:00
Mike Jolley 29d6f69a87 Revert "Clear parent transients on variation save"
This reverts commit 0694312cc9.
2017-03-28 14:32:52 +01:00
Mike Jolley e575904fbf Revert "Clear parent transient on variation creation"
This reverts commit 5f573b8777.
2017-03-28 14:32:46 +01:00
Mike Jolley 5f573b8777 Clear parent transient on variation creation 2017-03-28 14:01:02 +01:00
Mike Jolley 0694312cc9 Clear parent transients on variation save 2017-03-28 13:51:22 +01:00
Cesar Rodas 55ba115ac5 Make sure the changes includes either $name or $order_id 2017-03-28 08:47:01 -04:00
Mike Jolley b3198d2546 woocommerce_after_register_post_type action 2017-03-28 12:37:17 +01:00
Mike Jolley b35e4c0cf9 Load values only when not-empty/set
Closes #13785
2017-03-28 12:30:04 +01:00
Mike Jolley f50254be28 Update notice to protect against calls before post type registration
Closes #13763
2017-03-28 12:03:09 +01:00
Mike Jolley 129293ab6f Remove array filter
No args should be null/not set since all args defined by WC have values.

Closes #13786
2017-03-28 11:49:27 +01:00
Claudiu Lodromanean 89128da8ba Fix child_has_dimensions 2017-03-27 11:52:03 -07:00
Mike Jolley 13903220f7 Merge pull request #13779 from woocommerce/fix-13777
Net sales fix
2017-03-27 18:19:45 +01:00
Mike Jolley 57f733388c Unused variable 2017-03-27 17:32:00 +01:00
Mike Jolley be45bffd45 ignore duplicates 2017-03-27 17:27:42 +01:00
Mike Jolley 7202ebdb4a Remove shipping from net sales
Fixes #13777
2017-03-27 12:18:09 +01:00
Mike Jolley 9260babfba Fix end date when no date is set 2017-03-27 12:11:08 +01:00
Mike Jolley 6f3d0c1c11 Install terms prior to update
Closes #13770
2017-03-27 11:55:36 +01:00
Cesar Rodas f2f6d76f6d Do not update woocommerce_order_items if nothing changed
Do not update the item (`woocommerce_order_items`) unless something changed.
2017-03-25 00:30:12 -03:00
Mike Jolley 5ceef2cdd5 Check we have a product object. 2017-03-24 15:02:51 +00:00
Claudio Sanches 9983b005a6 Merge pull request #13766 from woocommerce/fix-13722
Settings API fixes
2017-03-24 11:24:28 -03:00
Claudio Sanches eb0f9656c2 Merge pull request #13765 from woocommerce/fix-13752
Cast values to float
2017-03-24 11:18:03 -03:00
Claudio Sanches 1147c4f5b3 Merge pull request #13764 from woocommerce/fix-13750
Support (not really) relative paths
2017-03-24 11:16:48 -03:00
Mike Jolley ca8fafdd36 Hide enabled/description 2017-03-24 13:27:47 +00:00
Mike Jolley 53a7d54253 Update settings once 2017-03-24 13:22:09 +00:00
pierrebuet 32f8142c91 Fixes #13748 2017-03-24 12:13:00 +00:00
Mike Jolley 7857fbe41f Cast values to float
Fixes #13752
2017-03-24 12:05:28 +00:00
Mike Jolley 7fd2f4f554 Support (not really) relative paths
Fixes #13750
2017-03-24 11:48:32 +00:00
Mike Jolley 8b4ce8460a Merge pull request #13757 from woocommerce/fix/rest-api/shipping-zones-methods-schema
[REST API] Properly handle required items of shipping zone methods
2017-03-24 10:39:23 +00:00
Mike Jolley 9af295d618 Merge pull request #13753 from woocommerce/fix/rest-api-shipping-zones-schema
[REST API] Fixed shipping zones schema
2017-03-24 10:38:51 +00:00
Mike Jolley a9f3f9b82c Merge pull request #13758 from woocommerce/fix/rest-api-system-status-schema
[REST API] System status schema fixes
2017-03-24 10:34:11 +00:00
Mike Jolley af8e892f97 Merge pull request #13759 from woocommerce/fix/rest-api-settings-links
[REST API] Fixed links of settings endpoint
2017-03-24 10:33:16 +00:00
Mike Jolley 803786ceeb Merge pull request #13755 from woocommerce/fix/shipping-zone-locations-schema
[REST API] Fixed shipping zone locations schema
2017-03-24 10:27:52 +00:00
Mike Jolley 285a49b7e0 Merge pull request #13747 from woocommerce/fix/rest-api-settings-schema
[REST API] Fixed settings schema.
2017-03-24 10:26:59 +00:00
Mike Jolley 5cb3b9e0ea Merge pull request #13751 from woocommerce/fix/rest-api-setting-options-rest-base
[REST API] Fix setting options rest base
2017-03-24 10:26:22 +00:00
Mike Jolley 0ad1f6a63f Merge pull request #13709 from woocommerce/fix-13708
Timezone/DST fixes
2017-03-24 10:25:08 +00:00
Manos Psychogyiopoulos 24a2ff1960 Add woocommerce_add_to_cart_sold_individually_found_in_cart hook
Makes it easy for 3p code to change the condition that identifies whether a "sold individually" product is in the cart. For example, 3p code may use this hook to identify whether a product with the same ID already exists in the cart (instead of relying on finding the same hash/key).
2017-03-24 10:41:27 +02:00
Claudio Sanches 7381b008e0 [REST API] Fixed links for settings endpoint
Do not allow embed and updated the key to reflect the items from the endpoint response
2017-03-24 01:56:50 -03:00
Claudio Sanches 00b9f636a8 Fixed description of items in system status schema 2017-03-24 00:48:41 -03:00
Claudio Sanches bfbd45cf85 [REST API] System status schema items are all view context only 2017-03-24 00:43:46 -03:00
Claudio Sanches 5cc246b5cb [REST API] All items from system status endpoint should be readonly 2017-03-24 00:41:39 -03:00
Claudio Sanches 3ca1d946d9 [REST API] Properly handle required items of shipping zone methods 2017-03-23 22:19:16 -03:00
Claudio Sanches 7a671ab8a5 [REST API] Fixed shipping zone locations schema
This also fix improper sanitization and validation of the items.
2017-03-23 21:44:46 -03:00
Claudio Sanches 8f3f313eff Fixed coding standards 2017-03-23 20:56:02 -03:00
Claudio Sanches 85494e5d86 [REST API] Fixed shipping zones schema
"name" is only required while creating a new zone.
"order" do request to define "required" and is already sanitized by
"integer" type.
2017-03-23 20:51:21 -03:00
Claudio Sanches b1023c23c6 Fixed setting options endpoint tests 2017-03-23 20:45:22 -03:00
Claudio Sanches ffe1deba51 Disable setting options endpoint in CLI 2017-03-23 20:37:42 -03:00
Claudio Sanches c24882f5d2 Apply change on rest_base to WC_REST_Setting_Options_Controller methods 2017-03-23 20:05:19 -03:00
Claudio Sanches fb80482d73 Fixed rest_base 2017-03-23 19:56:56 -03:00
Claudio Sanches 0a7076744e [REST API] Fixed settings/options rest_base 2017-03-23 19:52:35 -03:00
Claudio Sanches 39e1fd9fc3 Merge pull request #13745 from woocommerce/fix/rest-api-name-convention
[REST API] Fixed file name convention
2017-03-23 19:50:51 -03:00
Claudio Sanches 94cb95c000 Merge pull request #13746 from woocommerce/fix/rest-api-shipping-methods-schema
[REST API] All items in shipping_methods endpoint are readonly
2017-03-23 19:50:39 -03:00
Claudio Sanches e33235ebf3 [REST API] Fixed settings schema.
Included context and readonly for all items.

And removed sanitize_callback used only in write context
2017-03-23 18:15:30 -03:00
Claudio Sanches f65cbdbfa4 [REST API] All items in shipping_methods endpoint are readonly 2017-03-23 17:59:50 -03:00
Claudio Sanches 44319e20f7 [REST API] Fixed file name convention 2017-03-23 17:48:37 -03:00
Claudio Sanches b8faa2197c [REST API] Fixed default_attributes in legacy REST API 2017-03-23 17:23:12 -03:00
Claudio Sanches 8371882002 [REST API] Fixed a minor bug that prevents saving default_attributes 2017-03-23 17:19:07 -03:00
Mike Jolley 1876c83409 Merge pull request #13743 from rodrigoprimo/deprecated-messages
Add the class name to deprecated messages wherever appropriate
2017-03-23 16:37:46 +00:00
Mike Jolley 91aa8a1b09 Merge pull request #13742 from woocommerce/fix-13734
Show variation prices if the sale prices do not all match
2017-03-23 16:37:04 +00:00
Rodrigo Primo 28c8ae8f95 Add the class name to deprecated messages wherever appropriate
Doing this change to make it easier to locate the deprecated method and its replacement and also to be consistent with the other deprecated messages.
2017-03-23 12:32:02 -03:00
Mike Jolley 9ea23023c5 Merge pull request #13737 from woocommerce/fix-13728
Use floats for qty
2017-03-23 15:14:28 +00:00
Mike Jolley 73dd37fbd7 Show variation prices if the sale prices do not all match
fixes #13734
2017-03-23 14:21:16 +00:00
terenceneedssurgery a86d4f62f3 Checkout: Order Pay to Template 2017-03-23 11:25:08 +00:00
Mike Jolley a0949747fa Hide refund email from resend option
Closes #13713

See https://github.com/woocommerce/woocommerce/issues/13738
2017-03-23 11:25:03 +00:00
Mike Jolley 489ebedfcd Use floats for qty
Fixes #13728
2017-03-23 11:18:41 +00:00
Mike Jolley 8a9e55ed33 Merge pull request #13730 from woocommerce/rest-api-fix-variations-image-object
[REST API] Handle variation image as object and not array
2017-03-23 11:05:17 +00:00
Mike Jolley b334af4544 Merge pull request #13732 from woocommerce/rest-api-fix-context
[REST API] Fixed context from items in schema
2017-03-23 11:04:50 +00:00
Mike Jolley f15d4c11a2 Merge pull request #13733 from woocommerce/rest-api-remove-product-download-type
[REST API] Removed deprecated download_type from products v2
2017-03-23 11:04:36 +00:00
Mike Jolley d9d62fac15 Merge pull request #13723 from rellect/colorpicker-rtl
RTL - prevent flipping of color input
2017-03-23 11:02:55 +00:00
Claudio Sanches 6bc29aa77f [REST API] Removed deprecated download_type from products v2 2017-03-23 02:32:47 -03:00
Claudio Sanches 1072bea460 [REST API] Fixed variations context for products v2 2017-03-23 02:29:06 -03:00
Claudio Sanches 7dfd62ecfc [REST API] Fixed download_type context for products v1 2017-03-23 02:28:21 -03:00
Claudio Sanches 39ed5c00cf [REST API] Fixed refunded_by context in order refunds 2017-03-23 02:27:32 -03:00
Claudio Sanches 5a85e6a6f8 [REST API] Handle variation image as object and not array 2017-03-23 00:38:52 -03:00
Mike Jolley ba07d53768 Remove guesswork from timezone handling so offsets work correctly regardless of DST 2017-03-23 00:11:15 +00:00
Mike Jolley 7e462b9cca Data store date handling 2017-03-23 00:10:29 +00:00
Mike Jolley 8efb45312d Merge pull request #13726 from woocommerce/rest-api-product-review-gmt
[REST API] Fixed timezone date and included GMT date to product reviews
2017-03-22 21:51:34 +00:00
Mike Jolley 7afb1bb427 Merge pull request #13727 from woocommerce/rest-api-webhooks-gmt
[REST API] Fixed dates and included GMT dates in webhook endpoints for v2
2017-03-22 21:50:56 +00:00
Mike Jolley 21b1a83624 Merge pull request #13725 from woocommerce/rest-api-product-images-dates
[REST API] Include GMT dates for images in schema
2017-03-22 21:44:32 +00:00
Mike Jolley 9673b592f3 Merge pull request #13724 from woocommerce/dates-categories-images
[REST API] Added timezone and GMT dates in category image
2017-03-22 21:44:09 +00:00
Claudio Sanches c074c9d57b [REST API] Fixed date and included GMT dates to webhooks 2017-03-22 18:36:15 -03:00
Claudio Sanches 7f8c4b18e1 [REST API] Fixed date and included GMT date for webhook deliveries 2017-03-22 18:34:10 -03:00
Claudio Sanches 73f7a39d09 [REST API] Fixed timezone date and included GMT date to product reviews 2017-03-22 18:28:57 -03:00
Claudio Sanches 0f5e6373e4 [REST API] Include GMT dates for images in schema 2017-03-22 18:23:41 -03:00
Claudio Sanches dbd2409e03 [REST API] Added timezone and GMT dates in category image 2017-03-22 18:17:53 -03:00
refael iliaguyev d8cd0a7550 prevent flipping of color input in rtl 2017-03-22 22:12:07 +02:00
Mike Jolley 72be782e2a Merge pull request #13719 from rodrigoprimo/remove-unused-phpdoc
Remove phpdoc for non-existing argument on WC_Order_Item_Product::get_product()
2017-03-22 19:16:39 +00:00
Mike Jolley 31784f23e3 Merge pull request #13720 from rodrigoprimo/remove-unused-variable
Remove unused global variable from WC_Order_Item_Product::get_item_downloads()
2017-03-22 19:16:25 +00:00
Rodrigo Primo b47a7b52df Remove phpdoc for non-existing argument on WC_Order_Item_Product::get_product() 2017-03-22 16:04:49 -03:00
Mike Jolley 56d55517cc Merge pull request #13698 from woocommerce/remove-factory-cache
Remove factory cache
2017-03-22 19:02:53 +00:00
Mike Jolley b1e76fa68e Merge pull request #13718 from rellect/correct-hours-minutes-rtl
RTL - Correct hour:minute input alignment in order details
2017-03-22 19:02:29 +00:00
Rodrigo Primo ce9ecefa98 Remove unused global variable from WC_Order_Item_Product::get_item_downloads() 2017-03-22 16:00:11 -03:00
refael iliaguyev baef6f3907 correct hours:minutes inputs in rtl 2017-03-22 20:17:35 +02:00
Brent Shepherd 16cc914714 Restore prior order item length
To maintain backward compatibility with custom order item types,
like 'order_item_pending_switch' used by Subscriptions.
2017-03-22 10:11:46 -07:00
Mike Jolley a876862bfb Merge pull request #13693 from woocommerce/orders-refunds-fix-schema
Include missing api_refund item to order refunds schema
2017-03-22 15:21:37 +00:00
Mike Jolley b55f59e975 Merge pull request #13694 from woocommerce/fix-missing-settings-schema
Include missing payment gateways and shippingmethods settings schema
2017-03-22 15:21:27 +00:00
Mike Jolley 64905a4d5e Merge pull request #13692 from woocommerce/order-notes-dates
Include date_created_gmt in order notes endpoint
2017-03-22 15:21:19 +00:00
Claudio Sanches 7f7fbcbb5d Improve order notes schema 2017-03-22 10:53:59 -03:00
Claudio Sanches 8184757e8a Improved descrition of items in schema 2017-03-22 10:51:52 -03:00
Claudio Sanches 1480257768 Merge pull request #13704 from woocommerce/fix-13700
Allow `data-coupon` through kses
2017-03-22 10:47:01 -03:00
faisal-alvi 301bc05a19 Update class-wc-post-types.php 2017-03-22 19:11:21 +05:30
Claudio Sanches 7485b418d7 Improve api_refund description 2017-03-22 10:39:23 -03:00
Mike Jolley 3b35d95c6a Use gmdate and GMT in data stores so times are not changed 2017-03-22 12:01:38 +00:00
Mike Jolley 15bbac6b5c Allow `data-coupon` though kses
Fixes #13700
2017-03-22 10:53:18 +00:00
Mike Jolley 414e2b9501 Shared cache for order items 2017-03-21 23:50:05 +00:00
Mike Jolley 91f109c33d Cache order item data 2017-03-21 23:38:04 +00:00
Mike Jolley 2763abb605 Cache order items 2017-03-21 23:37:47 +00:00
Mike Jolley c4c8edee5f Remove order and product factory cache 2017-03-21 23:37:38 +00:00
David Anderson 57ab34f13e Remove redundant / awkward empty password check
WooCommerce here checks that the password is not empty. This check is redundant, because it is already performed by wp_authenticate_email_password() (which is invoked, eventually, by the call in WC to wp_signon() ). Moreover, it is harmful, because it prevents extension of the login form. For example, in my use case, I have added a code to be scanned by a smartphone app as an alternative to the password. When the code is scanned, a password is required.

This extra/redundant check for an empty password on the WooCommerce form prevents my already-working-on-the-standard-wp-login-form code from working here, and there's no way to work around it that isn't hacky/ugly (e.g. direct manipulation of $_POST).
2017-03-21 23:21:43 +00:00
Mike Jolley 795e6871c0 Merge pull request #13691 from woocommerce/fix-address-labels
Improve address labels to help translations
2017-03-21 21:28:16 +00:00
Justin Shreve d11e7a93ca Merge pull request #13695 from woocommerce/fix-undefined-error-payments-endpoint
Fixed undefined variables in payment methods endpoint
2017-03-21 14:12:57 -07:00
Justin Shreve 8392c793a7 Merge pull request #13690 from woocommerce/sleep-wakeup-data
Sleep and Wakeup for WC_Data
2017-03-21 14:12:01 -07:00
Justin Shreve f4add2839b Merge pull request #13688 from alarocca130/master
Fix: post_meta function for payment token meta
2017-03-21 13:55:54 -07:00
Claudio Sanches be8ec903b5 Include missing payment gateways and shippingmethods settings schema 2017-03-21 17:47:28 -03:00
Claudio Sanches d2e1565f97 Fixed undefined variables in payment methods endpoint 2017-03-21 17:34:16 -03:00
Claudio Sanches 3b1da48c8d Fixed type 2017-03-21 17:07:01 -03:00
Claudio Sanches 461543fdbf Include missing api_refund item to order refunds schema 2017-03-21 17:04:25 -03:00
Claudio Sanches ad1dab947e Include date_created_gmt in order notes endpoint 2017-03-21 16:37:06 -03:00
Claudio Sanches b528e25759 Improve address labels to help translations 2017-03-21 15:54:23 -03:00
Mike Jolley 98f5ba44e8 Protection against removed objects. 2017-03-21 18:31:38 +00:00
Mike Jolley add78adf0c Merge branch 'master' into sleep-wakeup-data 2017-03-21 17:42:35 +00:00
Mike Jolley 991927c2d8 Handle sleep and wakeup in WC_Data class 2017-03-21 17:42:34 +00:00
Mike Jolley 9d5aee2c73 Remove code which expands/changes objects in emails 2017-03-21 17:36:46 +00:00
Mike Jolley 3e7f902e75 Merge pull request #13685 from woocommerce/fix-13682
Use display value when searching the title
2017-03-21 16:59:52 +00:00
Mike Jolley 1c2c9968d3 Merge pull request #13684 from woocommerce/fix-13681
get_tax_refunded_for_item ignoring tax id
2017-03-21 16:59:40 +00:00
alarocca130 7dc539e43b Fix: post_meta function for payment token meta 2017-03-21 17:41:00 +01:00
Mike Jolley e2c73c2277 Tweak labels for customer reg
Closes #13676
2017-03-21 13:23:38 +00:00
Claudio Sanches f6d7e52e06 Merge pull request #13687 from woocommerce/fix-13674
Cleanup of wc_cart_totals_coupon_html
2017-03-21 10:23:17 -03:00
Claudio Sanches fadfa4d903 Merge pull request #13686 from woocommerce/fix-13660
Use h2 in shortcodes and product loops
2017-03-21 10:22:14 -03:00
Mike Jolley 83ca80d466 Spacing and rules 2017-03-21 13:14:51 +00:00
Mike Jolley 18c22a885d Cleanup of wc_cart_totals_coupon_html
#13674
2017-03-21 13:04:29 +00:00
Mike Jolley 7bea5db423 Use h2
Fixes #13660
2017-03-21 12:54:04 +00:00
Mike Jolley 78d564e02c Merge pull request #13665 from JeroenSormani/custom-order-item
Add required filters to allow custom order item types
2017-03-21 12:08:28 +00:00
Mike Jolley 317ca0965e Use display value when searching the title
Fixes #13682
2017-03-21 11:30:57 +00:00
Mike Jolley 3a2f3586ed get_tax_refunded_for_item ignoring tax id
Fixes #13681
2017-03-21 11:20:39 +00:00
Claudiu Lodromanean c0a01a1fe4 Dont set empty strings as tax totals 2017-03-20 15:14:41 -07:00
Jeroen Sormani 9724bcd698 Change filter 'get_order_item_classname' to have $id 2017-03-20 21:42:57 +01:00
refael iliaguyev af55947f87 Revert "Drop repeated conditions for rtl aligning, use variable instead"
This reverts commit a894e7b241.
2017-03-20 22:21:44 +02:00
Claudio Sanches ee15a48b7e Merge pull request #13654 from woocommerce/fix-12804
[REST API] Return attribute names instead of slugs
2017-03-20 16:45:50 -03:00
Jeroen Sormani d07d32c3d2 Add empty/not-false
Ref: https://github.com/woocommerce/woocommerce/pull/13665/files#r106967582
2017-03-20 20:17:49 +01:00
refael iliaguyev a894e7b241 Drop repeated conditions for rtl aligning, use variable instead 2017-03-20 20:53:16 +02:00
Claudio Sanches b7c53bda38 Merge pull request #13672 from woocommerce/schema-text
Schema text changes
2017-03-20 14:02:44 -03:00
Mike Jolley fe76452a61 Merge remote-tracking branch 'origin/master' 2017-03-20 16:25:40 +00:00
Mike Jolley f14ce2f5f4 Merge branch 'pr/13663' 2017-03-20 16:25:37 +00:00
Mike Jolley 357227f46a Code style 2017-03-20 16:25:30 +00:00
Mike Jolley 9bcfcb82c5 Merge branch 'master' into remove-product-internal-meta-keys
# Conflicts:
#	includes/data-stores/class-wc-product-data-store-cpt.php
2017-03-20 16:13:45 +00:00
Mike Jolley 47036f2f48 Update setting wording 2017-03-20 16:08:53 +00:00
Mike Jolley 94148cf512 Text changes 2017-03-20 16:01:55 +00:00
Mike Jolley dea59579bb description changes, and usage of ID's instead of IDs 2017-03-20 15:47:51 +00:00
Mike Jolley 2dbf0d7560 Merge pull request #13656 from woocommerce/remove-post-internal-meta-keys
Remove post related internal post keys from products
2017-03-20 12:48:39 +00:00
Mike Jolley 941815acf5 Merge pull request #13666 from JeroenSormani/miscellaneous-cleanup
Miscellaneous cleanup of typos + change some return types for IDE hel…
2017-03-20 12:41:33 +00:00
JeroenSormani a29ba23fab Miscellaneous cleanup of typos + change some return types for IDE helpers 2017-03-20 11:03:14 +01:00
JeroenSormani 373bdda4f8 Add required filters to allow custom order item types 2017-03-20 10:37:06 +01:00
Krzysztof Grabania b302d80707 Change default hidden shop_order columns
Since WC requires at least WP 4.4 we can use `default_hidden_columns` filter rather than creating user meta for hidden by default columns in shop orders. This PR also adds some conditional for hiding shipping or billing column based on `woocommerce_ship_to_countries` option.
2017-03-20 09:28:38 +01:00
corsonr c126ee9a99 Add maybe blank check for API keys & webhooks
For consistency purpose in the way we display empty data (like orders
or coupons), the maybe blank check replaces the default empty table by
a more friendly message explaining the purpose of API keys and webhooks.

Results:

![](http://cld.wthms.co/cEF9+)
2017-03-17 23:49:19 +01:00
Claudio Sanches 2d400bffd2 Remove post related internal post keys froom products 2017-03-17 17:37:38 -03:00
Claudio Sanches 1a87792109 Remove some product internal meta keys 2017-03-17 17:30:38 -03:00
Claudio Sanches e3c2c79e00 [REST API] Return attribute names instead of slugs
Closes #12804
2017-03-17 17:25:38 -03:00
Claudiu Lodromanean 7c8c17d284 Enable oembeds in short descriptions 2017-03-17 11:39:17 -07:00
Mike Jolley 196ba7b770 Ensure we have a product before checking if it exists
Fixes #13642
2017-03-17 16:26:26 +00:00
Justin Shreve a17ba8f3ad Merge pull request #13637 from woocommerce/fix/13636-serialized-data-stores
Preventing the instance Data Store from being serialized with the con…
2017-03-17 08:53:24 -07:00
Justin Shreve d457891bd8 Add punctuation to docblock comments. 2017-03-17 08:52:02 -07:00
Mike Jolley 2970a64516 Merge pull request #13643 from woocommerce/fix-13639
Force max to blank string when < 0
2017-03-17 15:36:35 +00:00
Mike Jolley 8d0a4a3caf Use correct getter in legacy API for get_discount
Fixes #13635
2017-03-17 14:37:19 +00:00
Mike Jolley e7397f96e7 Force max to blank string when < 0
Fixes #13639
2017-03-17 12:57:18 +00:00
Michael Pretty 1538eb9334 using old array constructor for older PHP support 2017-03-16 17:38:18 -04:00
Michael Pretty 980500c353 Preventing the instance Data Store from being serialized with the containing WC_Data object 2017-03-16 17:23:06 -04:00
Claudio Sanches 1aa8218b26 Fixed oauth signature replacing spaces by plus sign
oAuth signatures are encoded by base64, that can generate plus signs.
See RFC 4648 <http://www.rfc-editor.org/rfc/rfc4648.txt>

By default plus signs in query params are replaced into spaces while
trying to access by super globals like $_GET and $_POST

Closes #13615
2017-03-16 14:23:45 -03:00
Mike Jolley adfd955194 Merge pull request #13619 from woocommerce/fix-13618
Remove add to cart from referer
2017-03-16 16:47:17 +00:00
Mike Jolley a2d98883cd SQL should use = not IN
fixes #13616
2017-03-16 12:51:48 +00:00
Mike Jolley 5440a45587 Remove add to cart from referer
Fixes #13618
2017-03-16 11:18:15 +00:00
Claudio Sanches 0f4a8b88e2 Merge pull request #13612 from woocommerce/fix-payment-token-extra-data
Prevents combining empty arrays in WC_Payment_Token_Data_Store
2017-03-15 15:53:25 -03:00
Claudio Sanches abb053b277 Prevents combining empty arrays in WC_Payment_Token_Data_Store
PHP 5.3 and 5.2 issue E_WARNING and return FALSE for empty arrays.
2017-03-15 15:39:24 -03:00
Claudio Sanches c856abba3e Change default WordPress auto-draft title for product
This helps handle variations title while syncing variations.

Using a translatable string can led to errors, like a auto-draft started
by an user with WP admin set up as pt_BR and published by an user in
en_GB.
2017-03-15 15:12:49 -03:00
Claudio Sanches dfd2d7387c Revert 71ecb57 2017-03-15 14:08:41 -03:00
Claudio Sanches 71ecb57d2d Fixed missing text domain 2017-03-15 13:59:18 -03:00
Claudio Sanches 544060c0f2 Updated upgrade script from 2.7 to 3.0 2017-03-15 13:55:07 -03:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Mike Jolley 75a5b062cf Merge pull request #13577 from woocommerce/fix-13498
Timezone/Date method handling
2017-03-15 16:09:41 +00:00
Mike Jolley eba500d96a array spacing 2017-03-15 16:08:23 +00:00
Mike Jolley 0f2f1699dc Spacing 2017-03-15 16:08:10 +00:00
Mike Jolley d55653a408 Merge branch 'master' into fix-13498
# Conflicts:
#	includes/class-wc-order.php
#	tests/unit-tests/crud/data.php
2017-03-15 15:52:40 +00:00
Mike Jolley 943c507d3f Merge pull request #13606 from woocommerce/fix-13525-api
Fix 13525 api
2017-03-15 15:43:45 +00:00
Claudio Sanches af9d0961fc Merge pull request #13605 from woocommerce/fix-13604
Load photoswipe template only when scripts and styles are loaded
2017-03-15 12:38:40 -03:00
Mike Jolley 77cade928a Merge pull request #13596 from woocommerce/fix/payment-token-crud-pattern
Update Payment Tokens to follow the same pattern for custom data as other objects.
2017-03-15 15:38:31 +00:00
Claudiu Lodromanean f151576410 Add missing docblock 2017-03-15 08:32:17 -07:00
Mike Jolley a34dd0480d Merge pull request #13587 from woocommerce/fix-13525
Update coupon date handling
2017-03-15 15:26:41 +00:00
Claudiu Lodromanean 6e73c9ddab Bring up to date with main branch 2017-03-15 08:22:26 -07:00
Justin Shreve b917a87a73 Deprecated $context on get_display_name. 2017-03-15 08:21:02 -07:00
Claudiu Lodromanean 9703af350d Use correct legacy date format 2017-03-15 08:19:17 -07:00
Claudiu Lodromanean 0bbce21fd2 Line up whitespace 2017-03-15 08:13:06 -07:00
Claudiu Lodromanean bbfea35cf0 API tweaks from feedback 2017-03-15 08:10:42 -07:00
Claudiu Lodromanean 6fffb10e47 Merge remote-tracking branch 'origin/fix-13525' into HEAD 2017-03-15 07:42:24 -07:00
Claudiu Lodromanean 111246771c Use date_expires meta key 2017-03-15 07:38:57 -07:00
Mike Jolley deda0f21e9 Load photoswipe template only when scripts and styles are loaded 2017-03-15 13:36:11 +00:00
Boro Sitnikovski 74388dafbf Do not pass `true` to `update_post_meta` as prev value. 2017-03-15 14:33:24 +01:00
Mike Jolley 20b857bfbf Merge pull request #13602 from JeroenSormani/fix-false-deprecated
Remove @(deprecated) sign from docblock to prevent false notice in ed…
2017-03-15 09:55:13 +00:00
JeroenSormani 08e441149b Remove @(deprecated) sign from docblock to prevent false notice in editors 2017-03-15 09:46:17 +01:00
Claudiu Lodromanean 4483c292ba Missed a break 2017-03-14 16:04:34 -07:00
Claudiu Lodromanean 6351bb0c22 Update coupon API 2017-03-14 16:00:15 -07:00
Claudiu Lodromanean 51b7110de2 Update API v2 2017-03-14 14:43:53 -07:00
Claudiu Lodromanean cb3568add9 Add new meta key to internal meta keys 2017-03-14 14:14:07 -07:00
Claudiu Lodromanean f4d012cf00 Wrong branch
This reverts commit 983896cb8b.
2017-03-14 13:27:40 -07:00
Claudiu Lodromanean 983896cb8b Update v2 coupon api 2017-03-14 13:25:45 -07:00
Claudiu Lodromanean 9e724d44cc Save expiry time in new utc timestamp meta field 2017-03-14 12:49:40 -07:00
Justin Shreve fb124232cf Update Payment Tokens to follow the same pattern for custom data as other object types.
Payment tokens was introduced in 2.6 and was updated to use the new CRUD code while some of the CRUD system was still in flux.

While most things were correct, the prop handling for custom fields (like a card's last 4 digits) were directly calling meta functions, instead of delegating to the data store/parent.

This PR moves these props to `extra_data` and follows the same pattern as product types or order items. It also updates some version tags to 3.0.0. Finally, it adds an additional test for saving meta after a create which looks like it was lacking.

To Test:
* Run `phpunit`.
* Go to the "My Account" tab and add a new payment method. You need a payment gateway that supports this, like Simplify.
* Test the add a payment method flow.
* Make a test purchase using the saved payment method.
2017-03-14 12:33:35 -07:00
Mike Jolley 071d389c73 Merge pull request #13595 from woocommerce/13527-wp-api
Included access_expires_gmt to customer downloads endpoint v2
2017-03-14 19:21:08 +00:00
Claudio Sanches 1b1fc109f7 Included access_expires_gmt to customer downloads endpoint v2 2017-03-14 16:04:22 -03:00
Claudio Sanches 137de9eea6 Fixed access_expires in legacy REST API 2017-03-14 15:40:36 -03:00
Mike Jolley 7baf3ddc1c Remove the clear code and property from woocommerce_form_field
Fields can be sorted dynamically with JS, so the clear div will never
move with it and cannot be output reliably.

Clearing should be done with CSS.
2017-03-14 17:49:42 +00:00
Claudiu Lodromanean 62d00ff950 Return offset timestamp not utc in legacy 2017-03-14 10:39:37 -07:00
Claudiu Lodromanean 3476121709 Use local time where appropriate 2017-03-14 10:27:48 -07:00
Mike Jolley a3cc5cc9bb has_meta -> meta_exists
#13590

Avoid has_meta conflict with old method.

#13581
2017-03-14 16:49:13 +00:00
Mike Jolley 1740f1e3e8 Merge pull request #13590 from woocommerce/fix-13581
Add a has_meta method to WC_Data
2017-03-14 16:42:40 +00:00
Mike Jolley b7579b2686 Merge pull request #13589 from woocommerce/fix-13578
get_formatted_meta_data should ignore meta with no ID
2017-03-14 15:58:26 +00:00
Claudiu Lodromanean 76536688e2 Use utc time for expiry box 2017-03-14 08:17:53 -07:00
Claudiu Lodromanean f042305ff7 Update date_expires meta handling 2017-03-14 08:10:31 -07:00
Mike Jolley a0c160f6e9 Merge branch 'pr/13558' 2017-03-14 12:35:19 +00:00
Mike Jolley 49b782d20e Correct formatting 2017-03-14 12:34:20 +00:00
Mike Jolley a9e224fa78 Wrap rating with esc_html 2017-03-14 12:32:34 +00:00
Mike Jolley 9d7c5cee39 Work around legacy has_meta method for orders 2017-03-14 12:25:39 +00:00
Mike Jolley 7f787fac84 Check empty strings literally
Closes #13565
2017-03-14 12:17:49 +00:00
Mike Jolley e13badcdb3 Merge pull request #13584 from woocommerce/13527-update-downloads-dates
Apply WC_DateTime to WC_Customer_Downloads
2017-03-14 12:11:28 +00:00
Mike Jolley 8f2746049d has_meta method 2017-03-14 12:08:33 +00:00
Mike Jolley 186c26e60d Missing return in offsetSet 2017-03-14 11:33:35 +00:00
Mike Jolley f404eeede6 get_formatted_meta_data should ignore meta with no ID 2017-03-14 11:28:57 +00:00
Claudio Sanches 591327287a Do not set remaining downloads when is unlimited 2017-03-13 21:24:59 -03:00
Claudio Sanches f1c08f1a8e Updated downloads view on admin 2017-03-13 20:54:43 -03:00
Claudio Sanches c4134586cd FUpdate how save download dates 2017-03-13 20:54:33 -03:00
Claudio Sanches aaeab5b81e Use WWC_DateTime for access_granted 2017-03-13 20:36:04 -03:00
Claudio Sanches 792fe08f1d Updated WC_Customer_Downloads to use WC_DateeTime 2017-03-13 20:29:55 -03:00
Claudiu Lodromanean 9b7c08fe8f Update post type page with new date 2017-03-13 15:16:03 -07:00
Mike Jolley 02c826ba5e Correctly handle null values 2017-03-13 22:14:20 +00:00
Claudiu Lodromanean 12952ebcd0 Update coupon meta box with new date handling 2017-03-13 15:06:44 -07:00
Claudiu Lodromanean b018cdc037 Update legacy coupon class with new date handline 2017-03-13 15:05:57 -07:00
Claudiu Lodromanean b3c846da56 Use 2.6-format data for the expiry_date meta value 2017-03-13 14:37:34 -07:00
Mike Jolley 9bee678819 API updates 2017-03-13 21:36:31 +00:00
Claudiu Lodromanean f1925e561a Update coupon data store to use new dates 2017-03-13 14:24:05 -07:00
Claudiu Lodromanean 258845fb7b Use GMT timestamp when comparing expiry 2017-03-13 13:40:58 -07:00
Claudiu Lodromanean 7d9227d3af Update coupon object with new date 2017-03-13 13:31:40 -07:00
Mike Jolley dd1b8e35dc API endpoints 2017-03-13 20:26:52 +00:00
Mike Jolley 1bac579df7 Date getters and setters 2017-03-13 19:52:44 +00:00
Mike Jolley 7e165413cf Check for arrays, not serialised strings
Fixes #13556
2017-03-13 17:49:59 +00:00
Mike Jolley c80fed52d8 Merge pull request #13571 from woocommerce/fix-13529
Check $_POST before trying to save order address inputs
2017-03-13 17:47:21 +00:00
Mike Jolley 38f31d3b8e Remove broken coupon usage link
#13568
2017-03-13 17:27:59 +00:00
Claudio Sanches 75ae465924 Merge pull request #13564 from ramiy/i18n
i18n: escape translation strings and fix wrong usage of i18n functions
2017-03-13 14:08:41 -03:00
Claudiu Lodromanean cf397cfbdd Dont try and save inputs that arent there 2017-03-13 09:55:18 -07:00
Mike Jolley 19759a83b4 Merge pull request #13560 from JeroenSormani/php71-typecast-fix
Type cast ->get_weight() on WC_Cart::get_cart_contents_weight calcula…
2017-03-13 16:10:47 +00:00
Mike Jolley e5c753e757 Merge pull request #13557 from woocommerce/fix-13526-admin
Keep date compatibility in WC_Ajax::get_customer_details()
2017-03-13 16:05:17 +00:00
Mike Jolley d2bd1a422c Merge pull request #13555 from woocommerce/fix-13526-rest-api
Update date usage in REST API v1 and v2
2017-03-13 16:04:38 +00:00
Mike Jolley 0098595339 Merge pull request #13554 from woocommerce/fix-13526-legacy-api
Fix dates in customer legacy endpoints
2017-03-13 15:59:02 +00:00
Rami Yushuvaev d2457fe922 i18n: escape translation strings and fix wrong usage of i18n functions 2017-03-13 07:39:46 +02:00
JeroenSormani 91ce342e7c Type cast ->get_weight() on WC_Cart::get_cart_contents_weight calculation 2017-03-11 19:01:58 +01:00
fuzzguard 1a99235dc8 Adding in proper error handling from 'lostpassword_post'
Since WP version 4.4.0 the 'lostpassword_post' hook has had the ability to handle error messages from the WP_Error class.  This allows errors to to occur BEFORE the username or email address are validated against the WP.

wp-login.php
        /**
         * Fires before errors are returned from a password reset request.
         *
         * @since 2.1.0
         * @since 4.4.0 Added the `$errors` parameter.
         *
         * @param WP_Error $errors A WP_Error object containing any errors generated
         *                         by using invalid credentials.
         */
        do_action( 'lostpassword_post', $errors );

        if ( $errors->get_error_code() )
                return $errors;

Proposal is to have this same process be respected by WooCommerce Lost Password process.
2017-03-11 11:43:21 +11:00
Claudio Sanches 98d26521d1 Keep date compatibility in WC_Ajax::get_customer_details() 2017-03-10 20:13:56 -03:00
Claudio Sanches 3fbb8415d6 Change to single quotes 2017-03-10 19:14:28 -03:00
Claudio Sanches 8cefbd7c08 Added and fixed date properties for customers v2 endpoint 2017-03-10 19:10:41 -03:00
Claudio Sanches 7fb4340747 Updated dates for customers in REST API v1 2017-03-10 19:00:36 -03:00
Claudio Sanches c6fa88bde8 Both $server-format_datetime() variables are false by default 2017-03-10 18:15:05 -03:00
Claudio Sanches c353241599 Fixed dates in customer legacy endpoints 2017-03-10 18:10:03 -03:00
Claudio Sanches b36fea1ce5 [REST API] Use the same order as schema for refunds response 2017-03-10 17:26:36 -03:00
Claudio Sanches 65ed14635e Change bback $item to $data 2017-03-10 17:22:38 -03:00
Claudio Sanches 4ea40d997b [REST API] Improved order of items in Orders endpoint schema 2017-03-10 17:20:27 -03:00
Mike Jolley ff4b79a6fc Status transition hooks should never run when objects are read regardless of status being set.
Fixes #13547
2017-03-10 20:20:07 +00:00
Mike Jolley aac2e6a39c Refund schema 2017-03-10 19:30:07 +00:00
Mike Jolley 38afff0031 Merge pull request #13516 from woocommerce/fix-13505
Make increase_usage_count work correctly on concurrent checkout
2017-03-10 19:07:57 +00:00
Mike Jolley e6752932dd Sort 2017-03-10 19:05:32 +00:00
Mike Jolley 61484ed711 Update API endpoints 2017-03-10 18:54:59 +00:00
Claudiu Lodromanean 73ed273189 Use active voice 2017-03-10 10:32:27 -08:00
Claudiu Lodromanean d630b948e3 Better increase/decreasing 2017-03-10 10:28:56 -08:00
Claudiu Lodromanean e6a17a0fb3 Dont use set_prop on increase/decrease to prevent overwriting data 2017-03-10 09:27:39 -08:00
Claudiu Lodromanean d70723553d CHange vary to update 2017-03-10 09:18:14 -08:00
Mike Jolley 53962f1143 Other date_date call replacements 2017-03-10 16:43:05 +00:00
Mike Jolley 8ab839a030 Replace template usage of dates 2017-03-10 16:35:47 +00:00
Mike Jolley 84a1f0f92b wc_rest_prepare_date_response handling for WC_DateTime 2017-03-10 16:30:32 +00:00
Mike Jolley 8e169ede98 Legacy handling 2017-03-10 16:30:06 +00:00
Mike Jolley 339b1b7aab Set dates based on UTC 2017-03-10 16:29:52 +00:00
Mike Jolley 804573028d wc_format_datetime function 2017-03-10 16:29:42 +00:00
Mike Jolley 05e6c506ce Email dates 2017-03-10 16:29:15 +00:00
Mike Jolley 69cc8f5150 API dates 2017-03-10 16:28:50 +00:00
Konstantinos Kouratoras f77b03ef94 Add missing trailing punctuation
Trailing punctuation is missing, causing duplication of the same text in translation, although it exists in another file:
https://github.com/woocommerce/woocommerce/blob/master/includes/api/class-wc-rest-settings-options-controller.php#L482
2017-03-10 17:01:47 +02:00
Mike Jolley c2339e1983 Data store read 2017-03-10 14:48:18 +00:00
Mike Jolley bdc302a9fb Data store write 2017-03-10 14:44:00 +00:00
Mike Jolley 89fab41440 date_{paid|completed} getters and setters. 2017-03-10 14:25:40 +00:00
Mike Jolley 320cf818a5 Merge pull request #13539 from woocommerce/uses-gmdate-customer-last-update
Use GMT/UTC+0 when update customer last_update
2017-03-10 12:24:02 +00:00
Mike Jolley 66e8d9b054 Merge pull request #13530 from woocommerce/alt-fix-13496
Avoid filters during construct
2017-03-10 12:22:22 +00:00
Mike Jolley 2894d5aab0 Make needs_processing public so the data store can access. 2017-03-10 12:21:42 +00:00
Mike Jolley 4f1c433fbf Merge pull request #13532 from woocommerce/fix/order-item-meta-cache
Fix order item meta functions cache busting.
2017-03-10 11:47:26 +00:00
Claudio Sanches dbbe4617ee Do not force integer since will be saved as string by WordPress 2017-03-10 01:58:57 -03:00
Claudio Sanches 948963f5c7 Uses GMT/UTC+0 when update customer lastt_update 2017-03-10 01:57:53 -03:00
Claudio Sanches 4f1577fb27 Added support new WC_DateTime in WC_Customer 2017-03-10 01:20:33 -03:00
Claudio Sanches 377fbf9c44 Use WordPress wp_get_password_hint() function to display passowd hint
Closes #13534
2017-03-10 00:48:19 -03:00
Justin Shreve 9724b67ab8 Fix order item meta functions cache busting.
The cache busting currently in `wc_add_order_item_meta`, `wc_update_order_item_meta`, and `wc_delete_order_item_meta` doesn't actually bust anything. The cache line looks like it is from 2.6. The relevent cache to bust is actually in the `order-items` group and has a different key/prefix.
This bug allows your meta to get out of sync if you use these functions and then try to access a value from a CRUD object.

You can see this in the `test_wc_order_item_meta_functions` test I've added. If you keep your `wc-order-item-functions.php` as is, the asserts against `$item->get_meta` will fail.

To test:
* `phpunit --filter=test_wc_order_item_meta_functions`.
* Try before applying the `wc-order-item-functions.php` changes and after.
2017-03-09 13:36:23 -08:00
Justin Shreve cd92351dd7 Fix direct property access for coupon amount.
In 2.6, you could access the amount via $coupon->coupon_amount. Or legacy code incorrectly handles $coupon->amount instead. 7778583340/includes/class-wc-coupon.php (L102)

This PR handles both since the RCs and betas allowed `->amount` and I don't want to break anything that may be accessing it that way..

To Test:
* `phpunit --filter=test_coupon_backwards_compat_props_use_correct_getters`
2017-03-09 10:34:45 -08:00
Mike Jolley 99776e6374 Merge pull request #13514 from woocommerce/fix-13509
Apply_changes nested array fix and tests
2017-03-09 17:32:19 +00:00
Claudiu Lodromanean 8a18702c27 Just use array_replace_recursive in apply_changes 2017-03-09 09:06:05 -08:00
Claudiu Lodromanean 3aea9a0b2f DRY out the meta bumping functions 2017-03-09 08:51:47 -08:00
Mike Jolley 6848fad224 Merge branch 'timezone-poc' into fix-13498 2017-03-09 16:10:07 +00:00
Mike Jolley ac1c2f02b7 syntax 2017-03-09 14:53:52 +00:00
Mike Jolley 28a8d05285 Handle date paid in getter and during save to avoid filters during construct 2017-03-09 14:40:19 +00:00
Mike Jolley 9427eb048d Set default status in getter, not during contruct.
Prevents loops like in Prospress/woocommerce-subscriptions#1902
2017-03-09 13:45:33 +00:00
Mike Jolley 92f989d8ac Merge pull request #13528 from woocommerce/fix/legacy-get-item-downloads
Fix legacy get item downloads
2017-03-09 13:26:54 +00:00
Mike Jolley a5c10d07c1 Fix is_purchasable (requires save) when price is null
Fixes #13043
2017-03-09 13:26:12 +00:00
Boro Sitnikovski deae95b678 Updates after PR review 2017-03-09 12:55:33 +01:00
Mike Jolley d811317a1f Merge pull request #13511 from franticpsyx/fix-price-incl-excl-tax-zero-empty-inputs
[2.7] Unexpected wc_get_price_{in/ex}cluding tax behavior with zero/empty inputs
2017-03-09 11:46:39 +00:00
Mike Jolley a185e57ccb Admin panel should not hide _ meta.
Fixes #13510
2017-03-09 11:45:22 +00:00
Boro Sitnikovski 6c967697d9 Fix legacy get item downloads 2017-03-09 12:41:25 +01:00
Mike Jolley a598baaf9e date helper methods 2017-03-09 11:06:36 +00:00
Illimar Tambek 21a54b93d8 Use wc_clean to sanitize fee title in legacy apis
This will bring legacy APIs in line with the new REST API, where the
order item names are sanitized using wc_clean and fix the
backwards-incompatible change of using sanitize_title.
2017-03-09 11:00:35 +02:00
Illimar Tambek 8e81a7e4e0 Set order id for fees & shipping on legacy api
If order ID is not set, the item will be created, but will not be
associated with the order being updated.
2017-03-09 10:53:10 +02:00
Claudiu Lodromanean e36ee46dea Make increase_usage_count work correctly on concurrent checkoutt 2017-03-08 15:27:37 -08:00
Claudiu Lodromanean 3b8eb75c93 Better handling of nested arrays in apply_changes 2017-03-08 11:51:38 -08:00
Mike Jolley 94eaa67bc9 to string method 2017-03-08 18:14:37 +00:00
Mike Jolley a490b85d3e Handle saves 2017-03-08 16:51:46 +00:00
Mike Jolley 46416a7e36 WC_DateTime wrapper class 2017-03-08 16:51:35 +00:00
Mike Jolley 165cdca92b Display date in admin using offset 2017-03-08 16:51:22 +00:00
Mike Jolley c7dc8ae2b4 date_created and date_modified getters and setters 2017-03-08 16:51:10 +00:00
Mike Jolley 1a9c49db25 set_date_prop helper to convert dates in setters 2017-03-08 16:50:38 +00:00
Manos Psychogyiopoulos 5e8df27945 fix wc_get_price_{in/ex}cluding tax behavior with zero/empty inputs 2017-03-08 18:21:36 +02:00
Michael Pretty 6150ee2fde Validate the parent order ID by calling wc_get_order() instead of get_post() 2017-03-08 08:02:18 -05:00
Claudiu Lodromanean 28f8380ab6 Sprinkle some periods 2017-03-07 15:00:14 -08:00
Claudiu Lodromanean d0f47a7980 Revert to original behavior 2017-03-07 13:17:36 -08:00
Aristeides Stathopoulos 10ffc92a73 Inline control structures are not allowed 2017-03-07 22:24:24 +02:00
Claudiu Lodromanean 955a75bf30 Fix changes and more tests 2017-03-07 11:58:02 -08:00
Claudiu Lodromanean 2436541fff Fix individual use coupon handling 2017-03-07 11:31:20 -08:00
Mike Jolley 396985ec84 Merge pull request #13500 from aristath/phpcs-fix
PHPCS fixes
2017-03-07 18:01:05 +00:00
Aristeides Stathopoulos 70ee7ae7ea Fix some PHPCS errors 2017-03-07 19:57:28 +02:00
Claudiu Lodromanean dd97b7bc50 Allow product ids in get_product_data 2017-03-07 09:40:28 -08:00
Mike Jolley d5262a1711 Merge pull request #13497 from woocommerce/fix-13496
Remove filter in maybe_set_date_paid to avoid infinite loop
2017-03-07 17:18:04 +00:00
Claudio Sanches 1e576133b1 Merge pull request #13493 from woocommerce/fix-13489
Multiple arguments passed to isset must all be isset to be true. We need 'or'.
2017-03-07 13:01:03 -03:00
Mike Jolley be0a8d2c87 Remove filter in maybe_set_date_paid to avoid infinite loop
Fixes #13496
2017-03-07 14:45:42 +00:00
Mike Jolley ffa0bcc2bb Pass $this to woocommerce_payment_complete_order_status filter 2017-03-07 14:39:07 +00:00
Mike Jolley 578f89812c Use set_date_paid directly 2017-03-07 14:37:45 +00:00
Mike Jolley 5bdeddcb32 Hide suffix on variable product when dynamic.
Closes #13494
2017-03-07 13:25:52 +00:00
Mike Jolley 3eea782750 Brackets 2017-03-07 12:45:35 +00:00
Mike Jolley 3073867449 Multiple arguments passed to isset must all be isset to be true. We need 'or'.
Fixes #13489
2017-03-07 12:44:30 +00:00
Mike Jolley ce6c4a736f Merge pull request #13488 from woocommerce/downloads-consistency
Downloads data consistency
2017-03-07 12:13:03 +00:00
Mike Jolley 16b0aa9a52 Merge pull request #13487 from woocommerce/exclude-customer-internal-meta-data
Prevent update or list _order_count and _money_spent on WC_Customer_Data_Store
2017-03-07 10:29:34 +00:00
Mike Jolley 7940975f78 Merge pull request #13486 from woocommerce/coupons-consistency
Fixed coupons consistency with docblocks and REST API
2017-03-07 10:28:37 +00:00
Claudio Sanches df1a87a749 [REST API] Removed extra product_name in v1 and added schema for product_name in v2 2017-03-06 19:48:26 -03:00
Claudio Sanches a10fa76438 Fixed empty file object in downloads data and removee extra download_name 2017-03-06 19:45:03 -03:00
Claudio Sanches 64b45e9909 Prevent update or list _order_count and _money_spent on WC_Customer_Data_Store 2017-03-06 19:03:26 -03:00
Claudio Sanches 50d62a5c4c REST API v1 should return 0 when limit_usage_to_x_items is empty 2017-03-06 18:14:32 -03:00
Claudio Sanches de77bddcfb limit_usage_to_x_items should be integer 2017-03-06 18:14:15 -03:00
Justin Shreve 71d3308401 Show a reminder to include a valid --user flag when an authentication error is returned by the CLI.
Adds an additional message when the REST API returns 401 errors to the CLI, so that people properly include the `--user` flag.

To test:
* Run a command without a valid user ID (`wp wc product list`).
* See the additional error message.
* Run a command with a valid user ID, but cause another error, like a product not existing. (`wp wc product get 124124124 --user=1`).
* See that the extra error message is not displayed.
2017-03-06 11:34:06 -08:00
Mike Jolley 296daf19c2 Avoid wc_clean
Fixes #13464
2017-03-06 14:53:32 +00:00
Mike Jolley e5ed116e33 Split total row methods to avoid calling total row filter twice
Fixes #13456
2017-03-06 13:44:52 +00:00
Claudio Sanches 8a77bb0957 Fixed undefined $id #13405 2017-03-04 12:15:52 -03:00
Claudiu Lodromanean e4db7f1d76 Update variable names to correct ones 2017-03-03 14:40:31 -08:00
Claudio Sanches 7adb472a1c Fixed extra argument on array_map while setting categories and tags ids 2017-03-03 16:26:57 -03:00
Claudio Sanches 8d28e966c4 Let product CRUD handle terms IDs 2017-03-03 16:21:27 -03:00
Claudio Sanches a4b7cc5f0d Accept only list of terms IDs for product categories and tags 2017-03-03 16:19:32 -03:00
Claudio Sanches ee276e10a4 Merge pull request #13460 from woocommerce/fix-13458
Set line item prices on legacy API order create
2017-03-03 15:45:53 -03:00
Claudiu Lodromanean 51c5910866 Set line item prices on legacy API order create 2017-03-03 09:26:08 -08:00
Justin Shreve dc501dc3be Fix CLI notice when using --fields.
A non-existent variable was being passed to `limit_item_to_fields`, causing a PHP notice to be displayed.
`PHP Notice:  Undefined variable: fields in includes/cli/class-wc-cli-rest-command.php on line 183`

This PR passes the correct value.

To Test:

1. Use `wp wc product list --user=1 --fields="sku,name"` on the command-line.
2. Make sure that a PHP notice does not display in your debug log.
2017-03-03 08:55:22 -08:00
Mike Jolley 2b5bdaa15d Remove unused variable 2017-03-03 13:31:27 +00:00
Mike Jolley 09de226bd2 Fix error checking on endpoints to prevent fatal errors
Fixes #13453
2017-03-03 13:18:07 +00:00
Mike Jolley 9c988b3412 Merge branch 'master' into fix#13454 2017-03-03 10:52:14 +00:00
Mike Jolley 8440083fef Merge pull request #13443 from woocommerce/cache-groups
Standardize cache group names
2017-03-03 10:44:34 +00:00
Mike Jolley 0a53e0e47f Merge pull request #13444 from woocommerce/fix-13420
Set date paid for old orders
2017-03-03 10:41:33 +00:00
faisal-alvi 8b579bb820 fix#13454 2017-03-03 15:18:59 +05:30
Claudio Sanches f7d8ddffab Merge pull request #13452 from woocommerce/fix-13405
Legacy API tweaks
2017-03-02 22:42:46 -03:00
Claudiu Lodromanean bd4458fa90 Change create to save 2017-03-02 14:28:35 -08:00
Claudio Sanches 29318f85a6 Merge pull request #13451 from thenbrent/fix_undefined_var
Fixes for $order_url variable
2017-03-02 19:17:01 -03:00
Claudio Sanches 7b77a9fd2e Merge pull request #13449 from woocommerce/fix-13427
get_meta should return empty array sometimes
2017-03-02 19:15:00 -03:00
Brent Shepherd 759de5cc00 Fix undefined $order_url variable
In the case of an order with no items.

Fix redundantly setting the $order_url multiple times in the case
of orders with more than one line item.
2017-03-02 13:09:38 -08:00
Claudio Sanches 3aa86075d1 Prevent errors when do not have a paid date 2017-03-02 16:29:04 -03:00
Claudiu Lodromanean d5fd1e46ee get_meta should return empty array sometimes 2017-03-02 11:16:49 -08:00
Claudio Sanches 9fb2ba7783 [REST API] date_paid should be in date time format, closes #13255 2017-03-02 15:25:32 -03:00
Mike Jolley 35eea95550 Set date paid for old order 2017-03-02 17:47:28 +00:00
Mike Jolley c76c2d1a8d Merge pull request #13442 from woocommerce/fix-13419
Update date created/modified if changed.
2017-03-02 17:39:45 +00:00
Mike Jolley 1a8737fdeb Standardize cache group names 2017-03-02 17:15:39 +00:00
Mike Jolley 200f4c7741 Merge pull request #13414 from woocommerce/fix-13400
Dont save empty text attributes
2017-03-02 16:52:34 +00:00
Mike Jolley 0b0066b2a0 Merge pull request #13424 from woocommerce/fix/reintroduce-virtual-coupons
Reintroduce virtual coupons by "un"deprecating the filter.
2017-03-02 16:52:24 +00:00
Claudio Sanches 6dad909570 Merge pull request #13425 from woocommerce/fix-13411
Dont render empty stock descriptions
2017-03-02 13:49:12 -03:00
Mike Jolley fd07d06825 Update date created/modified if changed.
Fixes #13419
2017-03-02 16:46:59 +00:00
Claudiu Lodromanean 3f1d538878 Single quotes instead of double 2017-03-02 08:45:01 -08:00
Claudiu Lodromanean 36a8d08a5f Tweak no-availability check 2017-03-02 08:30:01 -08:00
Claudiu Lodromanean 527fb42771 Refactor empty option check 2017-03-02 08:21:20 -08:00
Mike Jolley 5637f043e5 Fix term name in update function
Closes #13398
2017-03-02 15:59:22 +00:00
Mike Jolley 2e56114d8e Fix styling of variation upsells 2017-03-02 15:33:08 +00:00
Mike Jolley 0dfab8326b Backwards compatibility for woocommerce_upsell_display_args 2017-03-02 15:29:15 +00:00
Mike Jolley 793b2dfa69 woocommerce_upsells_total filter.
Closes #13436
2017-03-02 15:15:41 +00:00
Mike Jolley c29f6bba50 Merge pull request #13408 from woocommerce/fix-13396
Better invalid data store handling
2017-03-02 12:46:51 +00:00
Claudiu Lodromanean 635f8c38a7 Dont render empty stock descriptions 2017-03-01 15:19:31 -08:00
Boro Sitnikovski 519e81ef59 Merge branch 'master' into fix/reintroduce-virtual-coupons 2017-03-02 00:09:03 +01:00
Claudiu Lodromanean f7752fb9b7 Merge pull request #13413 from JeroenSormani/fix-set-bill-location
Set the $state default to '' to prevent warning
2017-03-01 14:18:02 -08:00
Boro Sitnikovski 428e32bfa9 Reintroduce virtual coupons by "un"deprecating the filter.
We also need to return to skip CRUD processing.
2017-03-01 22:49:21 +01:00
Justin Shreve 14b06ee323 Merge pull request #13423 from woocommerce/fix/rest-command-notice
Fix PHP notice that displays when running CLI commands that accept no ID arguments.
2017-03-01 13:38:11 -08:00
Justin Shreve 0a4c20183d Merge pull request #13421 from woocommerce/fix/cli-version-target
Only target v2 of the WC REST API when generating CLI commands.
2017-03-01 13:34:59 -08:00
Justin Shreve e8754eafcb Fix the PHP notice that is displaying when running commands like shop_coupon list that accept no ID arguments. 2017-03-01 13:22:02 -08:00
Justin Shreve 9c8dd2d916 Only target v2 of the WC REST API when generating CLI commands. 2017-03-01 13:05:04 -08:00
JeroenSormani d97ae5f9a6 Set the default to '' to prevent warning 2017-03-01 19:45:38 +01:00
Claudiu Lodromanean e132dcba17 Dont save empty text attributes 2017-03-01 10:39:08 -08:00
JeroenSormani d553b080de Fix some docblock @param tags / remove a @access public 2017-03-01 18:44:11 +01:00
Peter J. Herrel 3f9bcc2a09 filter recent reviews dashboard widget query 2017-03-01 18:34:42 +01:00
Claudiu Lodromanean 1eafb487d7 Allow invalid data store exceptions to bubble 2017-03-01 09:24:30 -08:00
Claudiu Lodromanean 65b98b77a3 Better class-enforcing checking 2017-03-01 08:58:03 -08:00
Mike Jolley 2dd8ec743a Typo 2017-03-01 15:05:24 +00:00
Mike Jolley 3508578831 Merge pull request #13395 from woocommerce/optimise-cron-events
Email cron jobs - avoid storing full data objects
2017-02-28 21:31:25 +00:00
Mike Jolley 737c962e48 docblock 2017-02-28 21:16:58 +00:00
Mike Jolley 4f333d0e82 More efficient expand 2017-02-28 21:16:03 +00:00
Mike Jolley fb576b015b Email cron jobs - avoid storing full data objects 2017-02-28 20:35:52 +00:00
Michael Pretty 63dca2393c Allow use of a specific instance of a data store
fixes #13393
2017-02-28 15:01:06 -05:00
Mike Jolley 6edd13579b Update date paid if transitioning to payment complete status (#13382)
* Update date paid if the from status is unpaid, and the to status is ! unpaid

Closes #13376

* maybe_set_date_paid, maybe_set_date_completed and needs_processing helpers

Set paid is performed once only for BW compatibility with #13375

* Should use set_date_completed

* Docblock and params
2017-02-28 19:08:12 +00:00
Lars Støttrup Nielsen 1eee494b5d Removed redundant do_action 2017-02-28 19:32:13 +01:00
Claudiu Lodromanean 5ac880347c Merge pull request #13390 from woocommerce/video-updates
Video updates
2017-02-28 09:51:40 -08:00
Mike Jolley 432ca28398 Update cart discount for old orders (#13384)
* Total discount bw compat handling

Fixes #13383

* if
2017-02-28 17:49:54 +00:00
Claudiu Lodromanean 84091e5d4b Whitespace tweak 2017-02-28 09:49:15 -08:00
Mike Jolley 7ab0b99afe Merge pull request #13389 from woocommerce/fix-13388
Fix trashed variation cleanup
2017-02-28 17:45:02 +00:00
Lars Støttrup Nielsen 18c74817fc Added two do_actions to wc_reorder_terms 2017-02-28 18:02:49 +01:00
Ryan Ray 05a40d8df7 Merge branch 'master' into video-updates 2017-02-28 10:56:28 -05:00
Mike Jolley 41a4bdb181 Fix trashed variation cleanup
Fixes #13388
2017-02-28 15:38:11 +00:00
Mike Jolley 5236f48822 Merge pull request #13387 from woocommerce/checkout-styles
Checkout styles
2017-02-28 14:19:57 +00:00
Mike Jolley 3df175fbc5 Hide bacs if empty 2017-02-28 12:46:31 +00:00
Konstantinos Kouratoras 4d8714c50a Fix a typo in help section
Fix `splease` typo in help section.
2017-02-28 13:24:30 +02:00
Mike Jolley 8b4625e02e Legacy variation meta handling 2017-02-28 10:29:08 +00:00
Mike Jolley fd94ce74bc Rogue exit in data store 2017-02-28 00:53:41 +00:00
Mike Jolley 906bc70e74 Fix permalink base check
Closes #13374
2017-02-28 00:16:26 +00:00
Claudiu Lodromanean 4a4de2a951 Americanize some words 2017-02-27 14:59:37 -08:00
Mike Jolley 8cc23eacdf Merge pull request #13369 from woocommerce/fix-order-refund-methods
Fix order refund methods
2017-02-27 18:02:22 +00:00
Mike Jolley 790dd57933 Apologise -> american english
Closes #13370
2017-02-27 17:39:08 +00:00
Mike Jolley f2990b0c7d Check we have a WC_Order during email events 2017-02-27 17:08:13 +00:00
Mike Jolley f5a36778fd Move refund/payment method code out of abstract 2017-02-27 17:06:09 +00:00
Mike Jolley 84a4c3415c Handle auto drafts
Fixes #13361
2017-02-27 14:40:48 +00:00
Mike Jolley 194ed85d0e Change title update logic to look at product version and prefix
Fixes #13363
2017-02-27 14:40:32 +00:00
Mike Jolley 5c06a6a591 Missing wc_format_localized_price
Fixes #13356
2017-02-27 13:39:35 +00:00
Mike Jolley fce44e2271 Status filter adjustment #13357 2017-02-27 11:55:09 +00:00
Ryan Ray 024b77f088 Updated the embed code.
Added a few new videos.
Modified the videos to include more appropriate time stamps
2017-02-25 13:45:00 -05:00
Ryan Ray b2107f1a62 Renaming what used to be WooCommerce 101 videos to the current Guided
Tour naming scheme.
2017-02-25 11:40:10 -05:00
Lars Støttrup Nielsen 7829ec297a do_action on single product reordering 2017-02-25 16:42:35 +01:00
Caleb Burks e782760011 Clean up
These lines, so long ;p
2017-02-25 02:27:38 -06:00
Caleb Burks 21da6ee31c Hide coupon free shipping conditionally 2017-02-25 02:16:30 -06:00
Claudio Sanches 1eccb65d85 Fixed coding standards 2017-02-24 17:30:41 -03:00
Claudio Sanches 572dd1c91e Merge pull request #13346 from woocommerce/i18n-urls
Fixed confuse translatable URLs
2017-02-24 17:18:37 -03:00
Claudio Sanches 4eccbef6e1 Fixed infinite loop cause by duplicated hook names 2017-02-24 17:02:05 -03:00
Claudio Sanches a4d2048755 Fixed confuse translatable URLs 2017-02-24 16:41:56 -03:00
Claudio Sanches c90e0259f2 Merge pull request #13338 from woocommerce/fix-13337
Check isset in check_comment_rating
2017-02-24 16:15:30 -03:00
Claudio Sanches d2ef02477a Merge pull request #13341 from woocommerce/fix-13326
Make theme handling methods static
2017-02-24 16:11:26 -03:00
Claudio Sanches 6f434ee828 Make WC_Twenty_Seventeen::init() static
@mikejolley
2017-02-24 16:10:34 -03:00
Claudio Sanches 5383349a0a Merge pull request #13339 from woocommerce/fix-13335
Edit context when duplicating skus
2017-02-24 16:07:17 -03:00
Claudio Sanches bf51da64d7 Merge branch 'master' into fix-13335 2017-02-24 16:07:00 -03:00
Claudio Sanches 3e7e9dafb1 Allow wc_format_decimal() return negative values 2017-02-24 15:58:02 -03:00
Claudio Sanches 2dc3033c1e Better fees description 2017-02-24 15:38:14 -03:00
Claudio Sanches 1fdcacc565 Stop remove negative fees 2017-02-24 15:31:51 -03:00
Claudio Sanches 9cb6549ea7 Merge pull request #13340 from woocommerce/fix-13331
JSON-LD
2017-02-24 15:10:23 -03:00
Mike Jolley 8ae66520e8 woocommerce_send_queued_transactional_email filter
Closes #13318
2017-02-24 13:16:41 +00:00
Mike Jolley 1aaefd9ed7 Make methods static 2017-02-24 12:41:15 +00:00
Mike Jolley 7739bca4fa Skip replies unless they have a rating. 2017-02-24 12:34:09 +00:00
Mike Jolley 0de73ee4f9 Only show reviewRating when rating is set. 2017-02-24 12:32:39 +00:00
Mike Jolley 6bc97dce91 wc_product_force_unique_sku edit context 2017-02-24 11:43:58 +00:00
Mike Jolley f9b17ea681 Use edit context when duplicating sku 2017-02-24 11:42:28 +00:00
Mike Jolley bed9313fab Check isset in check_comment_rating 2017-02-24 10:35:28 +00:00
Caleb Burks c4805e41e1 Use Select2 for layered nav
WIP
2017-02-24 02:18:38 -06:00
Claudiu Lodromanean eca9828d66 Merge pull request #13330 from woocommerce/fix-13322
Fixed wrong index for _wc_variation_file_hashes
2017-02-23 13:39:55 -08:00
Claudio Sanches e0cffc0934 Merge pull request #13329 from woocommerce/fix-13320
Delete cached object when updating stock
2017-02-23 18:20:40 -03:00
Claudio Sanches ad09c23d1f Fixed wrong index for _wc_variation_file_hashes, closes #13322 2017-02-23 18:17:44 -03:00
Claudiu Lodromanean 07a021760a 13320 Delete cached object when updating stock 2017-02-23 12:56:34 -08:00
Claudio Sanches b51a160369 Merge pull request #13311 from woocommerce/fix-13297
Wrap read with try catch block
2017-02-23 17:49:55 -03:00
Claudio Sanches 688f77b1c3 Merge pull request #13327 from woocommerce/fix-13321
Map legacy tax array keys
2017-02-23 17:03:33 -03:00
Claudiu Lodromanean 252c08b943 Map legacy tax array keys to CRUD 2017-02-23 11:14:42 -08:00
Mike Jolley 6aa9a3936c Merge pull request #13324 from datafeedr/master
Removed duplicate $symbols array key
2017-02-23 18:11:33 +00:00
Mike Jolley 04aebd9fa7 Merge pull request #13306 from woocommerce/fix-13303
Fix multiple item additon to orders
2017-02-23 18:11:02 +00:00
Eric Busch c7b623e36a Removed duplicate $symbols array key
'MAD' key was used twice in the get_woocommerce_currency_symbol() function. Removed the 'MAD' key containing this value: '&#x62f;. &#x645;.'
2017-02-23 12:59:09 -05:00
Claudio Sanches a5752f9710 Merge pull request #13319 from woocommerce/legacy-order-read
Fix legacy read methods
2017-02-23 13:42:46 -03:00
Claudio Sanches c376173890 Merge pull request #13313 from woocommerce/fix-13264-2
Save existing rates rather than recreate all
2017-02-23 13:40:57 -03:00
Claudiu Lodromanean 330525eb47 Merge pull request #13317 from Chouby/deprecated_stock
Fix call to deprecated methods in ajax reduce/increase stock responses
2017-02-23 08:23:37 -08:00
Mike Jolley a9e001026d Fix legacy read methods 2017-02-23 16:19:19 +00:00
Claudio Sanches 9a666d23e1 Merge pull request #13310 from woocommerce/checkout-improvements
Checkout improvements and fixes
2017-02-23 13:15:06 -03:00
Claudio Sanches b17c3c86c6 Merge pull request #13316 from woocommerce/fix-13314
Handle _no_shipping_class
2017-02-23 12:58:51 -03:00
Frédéric Demarle c5247a8c4b Fix call to deprecated methods in ajax reduce/increase stock responses 2017-02-23 16:54:04 +01:00
Mike Jolley aaecd9e97c Handle _no_shipping_class 2017-02-23 15:48:53 +00:00
Claudio Sanches 22bb3071df Merge pull request #13305 from woocommerce/fix-13304
Fix unique sku function
2017-02-23 12:46:38 -03:00
Mike Jolley c5697f2d59 Logic error with used id 2017-02-23 15:25:49 +00:00
Mike Jolley 134df2f4a0 Save existing rates rather than recreate all
Fixes #13264
2017-02-23 14:14:50 +00:00
Mike Jolley 6f02cda453 get_item_count_refunded should be positive
Closes #13307
2017-02-23 13:52:17 +00:00
Mike Jolley 1463d2a9ba Merge pull request #13284 from woocommerce/fix-13275
Maintain support for non-prefixed item meta array access
2017-02-23 13:47:40 +00:00
Mike Jolley 7846def9b8 Use correct key to set/unset 2017-02-23 13:46:06 +00:00
Mike Jolley 1552ed8d6d Merge pull request #13309 from maximus80/master
fix photoswipe template be always loaded, even if lightbox is disabled
2017-02-23 13:11:36 +00:00
Mike Jolley 34d03e524a woocommerce_date_input_html_pattern filter
Closes #13289
2017-02-23 12:57:33 +00:00
Mike Jolley d56d11f1aa Use endpoint option in wc_get_endpoint_url
Fixes #13293
2017-02-23 12:37:41 +00:00
Mike Jolley 1d9f71fee5 Wrap read with try catch block 2017-02-23 12:09:39 +00:00
Mike Jolley eb47dc7036 Improve validation event 2017-02-23 11:51:27 +00:00
Maximus80 3c2ac21294 fix photoswipe template be always loaded 2017-02-23 11:46:48 +01:00
Mike Jolley f21997d661 Send items in one request rather than multiple requests 2017-02-23 10:19:32 +00:00
Mike Jolley dec52e8be2 Fix multiple item additon 2017-02-23 10:19:15 +00:00
Mike Jolley 2f44e5769b Don't adjust empty skus 2017-02-23 10:04:58 +00:00
Mike Jolley 4ff3c300ba Merge pull request #13298 from woocommerce/localized-coupon-amount
Coupon amount should be localized
2017-02-23 09:42:33 +00:00
Claudio Sanches 53cf89f63a Coupon amount should be localized 2017-02-22 18:58:32 -03:00
Claudio Sanches c473190756 Merge pull request #13285 from woocommerce/fix-13273
Trash and post status for orders
2017-02-22 18:56:55 -03:00
Claudio Sanches e42e2a3335 Replace woocommerce_coupon_code filter by wc_format_coupon_code() 2017-02-22 14:40:24 -03:00
Mike Jolley b409c1edef Use CRUD in coupons list 2017-02-22 17:29:59 +00:00
Mike Jolley 75928057ed Merge pull request #13282 from woocommerce/fix-13274
Check if product is taxable before calculating coupon tax.
2017-02-22 16:18:56 +00:00
Mike Jolley 3af989fa1b Merge pull request #13281 from woocommerce/fix-13265
Fix sale date field
2017-02-22 16:18:35 +00:00
Mike Jolley 4e7658a5ba Fix duplication by passing through force
Fixes #13286
2017-02-22 13:15:33 +00:00
Mike Jolley ded2accace Allow trash status to be set/returned rather than pending 2017-02-22 11:53:47 +00:00
Mike Jolley f80de0bc31 Use get_post_status directly in legacy code
Fixes #13273
2017-02-22 11:53:34 +00:00
Mike Jolley 729416a3b5 Non prefixed delete/set 2017-02-22 11:32:54 +00:00
Mike Jolley a9562ba558 Maintain support for non-prefixed item meta array access 2017-02-22 11:30:17 +00:00
Mike Jolley 1098d49526 Check if product is taxable. 2017-02-22 10:41:39 +00:00
Mike Jolley 2ac125417f Fix sale date field 2017-02-22 10:31:20 +00:00
Beka Rice 24b586c18f Fixes coupon styles so admin CSS applies 2017-02-21 21:29:06 -05:00
Mike Jolley af39a16434 Ensure date exists before setting
Fixes #13269
2017-02-21 20:50:52 +00:00
Mike Jolley 04955093d6 Use admin init hook
Closes #13248
2017-02-21 12:20:47 +00:00
Mike Jolley 02a57ab5cb Merge pull request #13259 from thenbrent/access_data_store_consistently
Access data store consistently
2017-02-21 09:59:26 +00:00
Mike Jolley b4bebfa218 Merge pull request #13258 from thenbrent/add_order_param
2.7: Pass $order to callbacks on checkout line item creation hooks
2017-02-21 09:58:35 +00:00
Mike Jolley 55ad57ff3a Merge pull request #13253 from woocommerce/fix-13249
Order Item Tax set_rate fixes
2017-02-21 09:55:22 +00:00
JeroenSormani 097309a0c8 Add 'priority' support to product data tabs 2017-02-21 08:34:43 +01:00
Brent Shepherd e01b3b2714 Pass $order on checkout line item hooks
Because otherwise, there is no way to find out what order the line
item is associated with as the order has not been saved, so does
not have an ID to set on the line item yet - $item->get_order_id()
will return 0.
2017-02-20 21:35:00 -08:00
Akeda Bagus 43a63985c6
Install pages action should return array instead of string.
Fixes #13256.
2017-02-21 12:01:27 +07:00
Claudiu Lodromanean 376c069f47 Merge pull request #13250 from woocommerce/improvement-13240
Helpful notices when deleted items in re-order
2017-02-20 16:08:32 -08:00
Claudiu Lodromanean 56b065a782 Performance updates to order tax 2017-02-20 13:50:07 -08:00
Claudiu Lodromanean b855003912 Might as well fix the compound too 2017-02-20 13:13:08 -08:00
Claudiu Lodromanean 79a65efa9c Use get_rate_label for setting the rate label 2017-02-20 12:57:21 -08:00
Claudio Sanches 93dac70fc2 Merge pull request #13252 from woocommerce/fix-13244
Check the nicename, not the sanitized name
2017-02-20 16:52:39 -03:00
Mike Jolley 73c651f4d0 Check the nicename, not the sanitized name 2017-02-20 18:04:45 +00:00
Claudiu Lodromanean 078032f623 Handle deleted items in re-order 2017-02-20 09:29:19 -08:00
Claudio Sanches 12d2d6656e Merge pull request #13246 from woocommerce/fix-13233
Reset columns when invalid
2017-02-20 12:28:50 -03:00
Claudio Sanches 88b38423f6 Merge pull request #13247 from woocommerce/fix-13243
Fix download count
2017-02-20 12:28:37 -03:00
Claudio Sanches 3939444454 Merge pull request #13242 from woocommerce/plain-text-data
Plain text emails and structured data
2017-02-20 12:22:42 -03:00
Mike Jolley 7aeb151bb6 Fix download count 2017-02-20 13:36:15 +00:00
Mike Jolley 35c3b829e4 Reset columns when invalid 2017-02-20 13:21:51 +00:00
Mike Jolley ca55291263 Skip plain text 2017-02-20 12:04:53 +00:00
Mike Jolley c2c7563dff Merge pull request #13235 from Chouby/product_duplicate
Separate logic from action for product duplicate
2017-02-20 11:12:23 +00:00
Mike Jolley 4c75f2b7a2 Fix max value logic and -1 handling
Fixes #13237
2017-02-20 11:10:19 +00:00
Frédéric Demarle 048882f66d Separate logic from action for product duplicate 2017-02-18 17:50:45 +01:00
Brent Shepherd e427f90a24 Access data store consistently
WC_Data object's data store is accessed everywhere else directly
via $this->data_store. This patch uses that same approach here.
2017-02-17 10:25:27 -08:00
Claudio Sanches 486a81bf12 Fixed coding standards 2017-02-17 16:10:15 -02:00
Mike Jolley 48c93d5293 Fix variation max qty. 2017-02-17 16:37:40 +00:00
Mike Jolley a5ddccf814 Merge pull request #13229 from woocommerce/remove-filter-for-v2
Allow filter query parameter only in REST API v1
2017-02-17 16:29:57 +00:00
Mike Jolley 88280d7756 Fix: Wrong product object 2017-02-17 16:28:11 +00:00
Mike Jolley a0483a30dc Clear children on stock update
Closes #13218
2017-02-17 16:25:45 +00:00
Claudio Sanches 542fea3d85 Merge pull request #13230 from woocommerce/quantity-actions-and-grouped-products
Quantity actions and grouped handling
2017-02-17 14:14:36 -02:00
Mike Jolley 1b268d2f63 use helpers 2017-02-17 15:52:47 +00:00
Mike Jolley 6201c7e22b Add get_min_purchase_quantity and max helper 2017-02-17 15:52:39 +00:00
Claudio Sanches 0410518f31 Removed filter query param from products queries in REST API 2017-02-17 13:15:54 -02:00
Claudio Sanches 8db3f3eaf0 Allow filter query parameter only in v1 2017-02-17 13:13:17 -02:00
pierrebuet 15275130e2 Fix access expires not set (#13227)
* fix user id for download file

* fix access expires for download when not set

‚NULL‘ trigger a 0000-00-00 00:00:00
 as date in the database column. In order to write a real Null to the
database, the quotations must be deleted
2017-02-17 15:04:21 +00:00
Mike Jolley 3a6b4ffb38 Doing it wrong notice when setting a negative fee in cart.
#13224
2017-02-17 12:28:18 +00:00
Kathy c30b1c1bb3 Coupon tweaks (#13222)
* pass coupon to applied/removed JS trigger

* add coupon id and coupon object to action hooks in admin metabox
2017-02-17 11:58:15 +00:00
pierrebuet f6c9dce9b4 fix user id for download file (#13220) 2017-02-17 11:55:11 +00:00
Mike Jolley 232162bbf0 Download BW compat
#13220
2017-02-17 11:54:50 +00:00
Claudio Sanches b0e6a5ab5d Get object again after saved 2017-02-17 01:46:42 -02:00
Claudio Sanches a46aea1b77 Fixedd status 2017-02-17 01:17:52 -02:00
Claudio Sanches 58d90a2ee8 Added legacy classes 2017-02-17 00:27:40 -02:00
Claudio Sanches 6af3b2255e Fixed default used_by 2017-02-17 00:10:46 -02:00
Claudio Sanches ba7607fe00 Improved delete_item() for products and variations 2017-02-17 00:10:25 -02:00
Claudio Sanches 18dc63757b BCheck if object exists 2017-02-17 00:09:46 -02:00
Claudio Sanches 94b0800735 Use CRUD Controller for product variations 2017-02-16 22:51:36 -02:00
Claudio Sanches 55977d03f3 Do not allow manipulate variations on products endpoint 2017-02-16 22:51:24 -02:00
Claudio Sanches 63cb7e7c27 Use CRUD Controller for products 2017-02-16 22:26:21 -02:00
Claudio Sanches 31f68377f9 Fixed docblock 2017-02-16 22:25:20 -02:00
Claudio Sanches 01a5296e7e Fixed how CRUD delete items by REST API 2017-02-16 22:25:07 -02:00
Claudio Sanches 197d2eb98e Use CRUD Controller for order refunds 2017-02-16 21:45:12 -02:00
Claudio Sanches 687433d5cc Use CRUD Controller for orders 2017-02-16 21:15:34 -02:00
Claudio Sanches 34cf70407e Use CRUD Controller for coupons 2017-02-16 20:31:36 -02:00
Claudio Sanches d4ce22cb76 Created WC_REST_CRUD_Controller 2017-02-16 20:27:07 -02:00
Claudio Sanches 7a52ec465b Fixed docblocks and removed dead variables 2017-02-16 18:05:06 -02:00
Mike Jolley 70d46fe008 Fix index checks 2017-02-16 16:45:50 +00:00
Mike Jolley b37e4da43c Move legacy classes to correct dir 2017-02-16 16:39:56 +00:00
Mike Jolley 1348f6efd7 Merge branch 'master' into db-schema-tweaks
# Conflicts:
#	includes/admin/class-wc-admin-duplicate-product.php
2017-02-16 16:33:20 +00:00
Mike Jolley dd3d46ccaf Merge branch 'master' into includes
# Conflicts:
#	includes/admin/class-wc-admin-duplicate-product.php
2017-02-16 16:28:46 +00:00
Mike Jolley 2505abeb21 Merge pull request #13202 from woocommerce/fix-13199
Duplicate products; fix variation creation and add actions
2017-02-16 16:18:53 +00:00
Mike Jolley b69988fe39 Correct changes in variation data update and fix context 2017-02-16 16:07:11 +00:00
Mike Jolley 4271352502 Escaping dates and statuses 2017-02-16 15:59:28 +00:00
Claudio Sanches 9c15ca936b Merge pull request #13206 from woocommerce/rest-api-v2
REST API v2
2017-02-16 12:53:46 -02:00
Mike Jolley fadc0937c3 product category count fix
Fixes #13191
2017-02-16 12:57:48 +00:00
Mike Jolley 5309b4ca7d woocommerce_delete_order_refund 2017-02-16 12:33:47 +00:00
Mike Jolley 244f075958 Fix preg match
Fixes #13205
2017-02-16 12:21:05 +00:00
Mike Jolley bbf8e750ce Tidy up includes 2017-02-16 11:46:01 +00:00
Mike Jolley 2afefcad90 Merge pull request #13203 from woocommerce/deprecated-hooks-tests
Deprecated hook handler unit tests
2017-02-16 11:01:45 +00:00
Mike Jolley 47078b4c15 Check product exists before getting permalink
Closes #13210
2017-02-16 10:38:14 +00:00
Mike Jolley bf384d07be use global in factory if no id is passed
Fixes #13211
2017-02-16 10:33:59 +00:00
Mike Jolley 1b2bdf7bfd Merge pull request #13207 from duracelltomi/master
Adding WP filter to is_order_received_page()
2017-02-16 10:12:05 +00:00
Akeda Bagus 9ad529f170
Replaced deprecated woocommerce_format_decimal with wc_format_decimal.
Fixes #13208.
2017-02-16 13:49:56 +07:00
Thomas Geiger 5f6295264d Adding WP filter to is_order_received_page()
Many plugins and themes rely on is_order_received_page() to include special codes when the user places an order. Some plugins however alter the flow: Klarna checkout for example uses a completely custom checkout flow, some other plugins adds the option to the user to specify a WP page as "the" order received page instead of the WooCommerce default. All those plugins break codes where is_order_received_page() is being used.
2017-02-16 07:00:16 +01:00
Claudio Sanches f08c10d068 Fixed and improved the variations endpoint 2017-02-16 03:07:51 -02:00
Claudio Sanches e48243aa0b No private methods in REST API 2017-02-16 02:30:04 -02:00
Claudio Sanches 666d1f3c06 Prevent PHP notices while saving meta_data without an id 2017-02-16 01:44:45 -02:00
Claudio Sanches 75b2661ba3 Fixed undefined $meta[id] 2017-02-16 01:42:47 -02:00
Claudio Sanches 036a2f6c92 Allow save meta data for products in v2 2017-02-16 01:39:30 -02:00
Claudio Sanches d2818be2ba Order refunds v1 and v2 2017-02-16 01:27:44 -02:00
Claudio Sanches a19fa78cef Fixed orders get_collection_params() 2017-02-16 01:10:41 -02:00
Claudio Sanches 5ebeafac33 Removed duplicated code 2017-02-16 01:09:36 -02:00
Claudio Sanches eaf492a7f1 Fixed orders v2 schema 2017-02-16 01:08:02 -02:00
Claudio Sanches 503812971d Fixed deprecated warnings in orders v1 2017-02-16 00:45:20 -02:00
Claudio Sanches 5c0046b325 Do not allow save meta_data in orders v1 2017-02-16 00:33:17 -02:00
Claudio Sanches cc1992f1c8 Fixed item variation_id 2017-02-16 00:26:42 -02:00
Claudio Sanches 2d0a479750 Updated v1 methods 2017-02-16 00:22:15 -02:00
Claudiu Lodromanean ca541f5704 Fix PHP 5.2 compat error 2017-02-15 13:18:46 -08:00
Claudiu Lodromanean 829fa246f2 Formatting 2017-02-15 12:13:29 -08:00
Claudiu Lodromanean e8579c649c Deprecated hook handler unit tests 2017-02-15 11:34:14 -08:00
Mike Jolley 9b7395705a Fix checkout $order property 2017-02-15 17:07:03 +00:00
Mike Jolley f664fb955f Refunds cannot be trashed
Avoid trashed status after deleting a refund.

Fixes #13200
2017-02-15 17:02:05 +00:00
Claudiu Lodromanean dda98da4ad Merge pull request #13192 from woocommerce/deprecated-hooks
Deprecated hook handling
2017-02-15 08:40:16 -08:00
Mike Jolley e07d9ad970 Actions and filters
Adds actions when duplicating things so objects can be changed, and
reinstates woocommerce_duplicate_product_exclude_meta which can unset
meta keys before save.

Closes #13180
2017-02-15 15:35:59 +00:00
Mike Jolley 2f685691a4 Standardise update meta calls, and support forcing
Force allows create to make sure data is set regardless of whether it
was changed. This fixes product duplication.

Fixes #13199
2017-02-15 14:40:57 +00:00
Claudio Sanches 7baaeaafd0 Public WC()->query->get_endpoints_mask() #13179 2017-02-15 12:30:23 -02:00
Claudio Sanches bad93d4c86 Improved naming for meta_data in schema 2017-02-15 12:28:45 -02:00
Claudio Sanches 185b1929e2 Merge pull request #13179 from helgatheviking/filter_query_vars
add woocommerce_get_query_vars filter
2017-02-15 12:28:01 -02:00
Mike Jolley 1dfdecf9b7 Merge pull request #13198 from woocommerce/fix/notice-on-saving-order
Fix PHP notice when there are shipping taxes.
2017-02-15 14:20:39 +00:00
Boro Sitnikovski 5dd607023b Fix PHP notice when there are shipping taxes. 2017-02-15 15:17:04 +01:00
Mike Jolley 019b2515b8 Merge pull request #13151 from thenbrent/reusable_checkout_line_item_creation
Make WC_Checkout line item creation methods reusable by 3rd party code
2017-02-15 13:11:41 +00:00
Mike Jolley adb718b71e Missing include 2017-02-15 11:45:07 +00:00
Mike Jolley f4ab01d276 Reduce index sizes based on data 2017-02-15 11:36:41 +00:00
Mike Jolley 5f20f9a1f1 Fix tax rate country index 2017-02-15 11:17:33 +00:00
Claudio Sanches 9012fead56 Merge pull request #13136 from woocommerce/improvement-12990
Add logic to variation title generation and remove redundant template info.
2017-02-14 19:15:48 -02:00
Claudiu Lodromanean 44af1237e5 Move things around for performance 2017-02-14 13:11:45 -08:00
Mike Jolley e8628ab412 Merge pull request #13188 from Chouby/master
[2.7] Add filter woocommerce_duplicate_product_exclude_children back
2017-02-14 19:39:17 +00:00
Mike Jolley 0c7218047c Fix error message 2017-02-14 19:31:14 +00:00
Mike Jolley e0d1cfc7b0 Actions 2017-02-14 19:23:57 +00:00
Claudiu Lodromanean 749971759f Reduce spacing back to original 2017-02-14 11:22:50 -08:00
Claudiu Lodromanean 332e79da8d Re-approach attribute skipping in simpler, general purpose way 2017-02-14 11:20:20 -08:00
Mike Jolley 17e8ea8236 Filter hooks 2017-02-14 18:57:45 +00:00
Mike Jolley 7b0b1529bf woocommerce_checkout_order_processed bw compat 2017-02-14 18:57:29 +00:00
Mike Jolley 6add2f9a64 WC_Deprecated_Hooks abstract 2017-02-14 18:56:09 +00:00
Mike Jolley 1a61f20785 Add actions to trigger legacy actions 2017-02-14 18:55:56 +00:00
Mike Jolley c53d0cc89c Correctly deprecate all methods and move action/filter code 2017-02-14 18:55:30 +00:00
Manos Psychogyiopoulos 821b360ac1 remove stray error_log 2017-02-14 18:26:40 +02:00
Manos Psychogyiopoulos 1895f65d2d allow update_post_meta and handle_updated_props to be overriden 2017-02-14 18:14:37 +02:00
Claudio Sanches 0dac5e596c Included meeta data to products 2017-02-14 14:01:31 -02:00
Claudio Sanches ad3716a49e Fixed coupons schema 2017-02-14 13:59:22 -02:00
Frédéric Demarle f502e306e6 Add filter woocommerce_duplicate_product_exclude_children back 2017-02-14 16:39:49 +01:00
Akeda Bagus 840a4b18a6
Fix wrong meta key in recorded_coupon_usage_counts getter/setter.
Fixes #13183.
Fixes #13182.
2017-02-14 17:33:32 +07:00
Claudiu Lodromanean 3068d56bac Remove unused variable 2017-02-13 14:19:26 -08:00
Claudiu Lodromanean ab1b3201e0 Update docblock 2017-02-13 13:54:52 -08:00
Claudiu Lodromanean afcbd456c4 Skip attributes in get_formatted_meta_data a different way 2017-02-13 13:53:22 -08:00
Claudio Sanches 5365fec1b3 V1 and V2 for products endpoint 2017-02-13 19:44:27 -02:00
Claudiu Lodromanean a8b491b55b Handle product titles with no attributes 2017-02-13 11:45:25 -08:00
Kathy Darling f29c51497e add woocommerce_get_query_vars filter 2017-02-13 12:22:05 -06:00
Mike Jolley 00cda91c73 Merge pull request #13164 from woocommerce/lazy-update-products-13157
Lazy update products
2017-02-13 17:24:51 +00:00
Mike Jolley ad442567d6 Remove isset rule 2017-02-13 14:39:00 +00:00
Mike Jolley bdf567e90d Adjust how product_type is deprecated 2017-02-13 14:31:43 +00:00
Mike Jolley 3157955414 Adjustments to schema
#13161
2017-02-13 14:04:33 +00:00
Mike Jolley d080e135ee Reduce `select *` usage 2017-02-13 12:58:42 +00:00
Jez McKean b65e41206f needs_shipping(): minor efficiency improvement
No need to check other products for whether they need shipping if we've already found one.
2017-02-13 12:28:50 +00:00
Mike Jolley cfa3c34ada bigint(20) replacement
Closes #13160
2017-02-13 11:49:30 +00:00
Mike Jolley f7da2c615a Remove location_type index
Closes #13162
2017-02-13 11:47:27 +00:00
Mike Jolley 8d13913e70 Avoid division by 0 in wc_get_loop_class
Closes #13159
2017-02-13 11:25:58 +00:00
Claudio Sanches 633ed64b02 Merge pull request #13156 from woocommerce/fix-12802
Improve checkout performance when updating product sales
2017-02-11 13:53:32 -02:00
Mike Jolley a20c0da580 syntax error 2017-02-11 15:50:21 +00:00
Mike Jolley 6cf98a7e4d Avoid read after updating meta in the database
@justinshreve Was there a reason this was added? I don’t see a reason
why it needs to be re-read if the array is up to date?
2017-02-11 15:45:13 +00:00
Mike Jolley ca1d49b2b6 Conditional visibility and downloads 2017-02-11 15:35:20 +00:00
Mike Jolley 91ac4a2e56 Remove update_term_counts
This does not look to be necessary because we use wp_set_post_terms
which handles this for us. Seems to be inherited from legacy.
2017-02-11 15:27:52 +00:00
Mike Jolley 8494bf7bee Conditonal post data saving 2017-02-11 15:26:13 +00:00
Claudio Sanches d02d90c867 V1 and V2 for product taxonomies, reviews, reports, taxes and webhooks 2017-02-11 12:51:41 -02:00
Claudio Sanches e9f2e75d53 Fixed coding standards and file header 2017-02-11 12:51:13 -02:00
Claudio Sanches 1b1b784cb4 Merge pull request #13158 from woocommerce/fix-13119
Only append tax price suffix if taxable
2017-02-11 12:08:11 -02:00
Mike Jolley eb518ec06d Only append tax price suffix if taxable 2017-02-11 00:08:49 +00:00
Mike Jolley 979e64c242 Merge pull request #13145 from woocommerce/fix/cli-id-docs
Fix CLI documentation for commands with multiple IDs.
2017-02-11 00:05:17 +00:00
Mike Jolley 31d428131e Imrpove checkout performance when updating product sales 2017-02-10 23:41:53 +00:00
Claudio Sanches 190ebccd00 Fixed order notes 2017-02-10 21:34:01 -02:00
Claudio Sanches 7f82051dd9 Fixed returning values in write context 2017-02-10 21:32:40 -02:00
Claudio Sanches ca67d448a2 Fixed doing it wrong notices 2017-02-10 21:11:56 -02:00
Claudiu Lodromanean 8a05f72f78 Minor clean-up 2017-02-10 14:35:26 -08:00
Claudiu Lodromanean f362e0108e Enable attribute suppression in wc_display_item_meta 2017-02-10 14:11:16 -08:00
Claudio Sanches e84acf3ee4 Order notes v2 2017-02-10 18:31:29 -02:00
Claudio Sanches e4b6c81f66 Customer downloads v2 2017-02-10 18:31:21 -02:00
Brent Shepherd 5d10c797d0 Make WC_Checkout line item creations reusable
By passing in dependencies, like cart items, fees, taxes or coupons,
as well as the cart to which they relate.
2017-02-10 12:03:32 -08:00
Claudiu Lodromanean 8d2fd29396 Don't rtlcss select2.css 2017-02-10 11:39:28 -08:00
Mike Jolley d693863ad2 Merge pull request #13064 from thenbrent/variable_product_sync_filters
Modify variable product sync hooks
2017-02-10 18:40:48 +00:00
Brent Shepherd 5d560f380a Remove 'woocommerce_variable_product_synced' hook
And add additional suggested alternatives to the deprecated
woocommerce_variable_product_sync hook.
2017-02-10 10:36:35 -08:00
Brent Shepherd 5dec55928b Add 'woocommerce_variable_product_sync_data'
Renaming 'woocommerce_variable_product_sync_before_save'
2017-02-10 10:33:48 -08:00
Claudiu Lodromanean b6b3f0c217 Modify product title logic 2017-02-10 10:19:05 -08:00
Mike Jolley 82d9abd4c5 Make sure enabled is checked by default
#13147
2017-02-10 17:43:32 +00:00
Claudio Sanches b1b536b5d2 Give REST API authentication a lower priority
Bigger than add_filter( 'determine_current_user', 'wp_validate_auth_cookie' );
Smaller than add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20
);

This solve issues while trying to authenticate in a browser while logged
in.

Closes #13134
2017-02-10 15:35:52 -02:00
Justin Shreve 700026c2ab Separate positional and assoc arguments. 2017-02-10 08:38:43 -08:00
Mike Jolley b58e26b0ab Backwards compatibility for triggers
Closes #13141
2017-02-10 13:09:37 +00:00
Mike Jolley 5349171083 This panel does not show in products anyway
Fixes #13133
2017-02-10 12:51:49 +00:00
Claudiu Lodromanean ab8fb48bb4 Fix and standardize e-mail sending 2017-02-09 14:49:39 -08:00
Claudiu Lodromanean 21617f408d Bring up to date with master 2017-02-09 14:06:49 -08:00
Claudiu Lodromanean e330ab4158 Pass product into filters 2017-02-09 14:05:40 -08:00
Claudiu Lodromanean a3f9207839 Add logic to variation title generation 2017-02-09 14:03:00 -08:00
Claudio Sanches ec8fe6e30d [REST API] Implement CRUD to customers 2017-02-09 19:54:16 -02:00
Claudio Sanches 23fbc31dfb [REST API v1] Implement CRUD to coupons 2017-02-09 19:22:19 -02:00
Claudio Sanches 5d87a28407 Restored shipping zones base controller 2017-02-09 18:46:57 -02:00
Claudio Sanches 88d2875514 Restored REST API v1 2017-02-09 18:40:35 -02:00
Claudio Sanches 4b156ab1ae Merge old REST API branch 2017-02-09 18:19:56 -02:00
Claudio Sanches feeb98e801 Merge pull request #13131 from woocommerce/cli-attrib
Restructure ID route code for the CLI & fix attribute term.
2017-02-09 18:14:19 -02:00
Justin Shreve 309d118287 Restructure ID route code for the CLI & make the attribute term command work. 2017-02-09 10:29:24 -08:00
Claudiu Lodromanean 3120a19dae Switch isset back to array_key_exists to keep null-default props working 2017-02-09 10:13:44 -08:00
Justin Shreve 988175b746 Merge pull request #13127 from woocommerce/fix/product-data-store-title
Don't use get_the_title during product read
2017-02-09 10:08:51 -08:00
Claudio Sanches c350ecfb99 Fixed PHP 5.2 fatal error, closes #13128 2017-02-09 15:27:26 -02:00
Claudio Sanches 4352484ed7 REST API v2 2017-02-09 15:06:13 -02:00
Justin Shreve 8a6bae374f Switch from get_the_title to the post objects post_title. 2017-02-09 08:43:48 -08:00
Mike Jolley 962b60c8fe kses/sanitize 2017-02-09 15:43:47 +00:00
Claudio Sanches 2c5f032b0b Merge pull request #13099 from woocommerce/fix-13011
If woocommerce_adjust_non_base_location_prices is false, remove modded tax, not base tax
2017-02-09 13:41:06 -02:00
Claudio Sanches 094b86c92b Merge pull request #13104 from woocommerce/fix-13015
Inherit shipping class id from parent
2017-02-09 13:37:54 -02:00
Claudio Sanches e3b563c518 Merge pull request #13044 from woocommerce/crud-perf-tweaks
[2.7] CRUD performance improvements for emails
2017-02-09 13:25:29 -02:00
Mike Jolley dcce2a4190 Change order of execution on checkout so shipping is required.
Closes #12992
2017-02-09 12:59:13 +00:00
Mike Jolley 234b4cfa91 Merge pull request #13009 from woocommerce/gallery-tweaks
Gallery tweaks
2017-02-09 12:34:23 +00:00
Mike Jolley d7e9af3ac8 Use current_theme_supports 2017-02-09 12:34:06 +00:00
Mike Jolley 7ff301e2ca Merge branch 'master' into crud-perf-tweaks
# Conflicts:
#	includes/data-stores/class-wc-order-item-data-store.php
2017-02-09 12:31:25 +00:00
Mike Jolley 16afdeec96 Add prefix 2017-02-09 12:30:33 +00:00
Mike Jolley 1c10ad94cb Remove order item column due to performance issues on orders screen 2017-02-09 12:29:16 +00:00
Mike Jolley b17932f4e3 Fix test due to invalid amount and caching 2017-02-09 12:04:44 +00:00
Mike Jolley 8242e5496d Switch locale only after init 2017-02-09 11:23:44 +00:00
Mike Jolley 8298c83e6f Set all default parent data 2017-02-09 11:07:34 +00:00
Mike Jolley 639b805a24 Merge pull request #13120 from woocommerce/fix/factory-type
Move post type logic from product and order factories.
2017-02-09 11:02:57 +00:00
Mike Jolley a7b2a0ac7c Merge pull request #13107 from woocommerce/fix-12962
Add locale independent wc_get_permalink_structure function
2017-02-08 23:33:56 +00:00
Justin Shreve 65b99bf240 moved order item type check to order item data store 2017-02-08 11:42:36 -08:00
Justin Shreve ae5293aeb9 Move the get type logic out of the product factories and into the data stores. 2017-02-08 11:18:39 -08:00
Mike Jolley c49368f7fc Small id fix for #13118 2017-02-08 18:19:24 +00:00
Claudio Sanches 9b0a4e6c92 Merge pull request #13109 from woocommerce/fix-regressed-tests
Fix failing tests and array_merge error
2017-02-08 16:18:08 -02:00
Claudio Sanches 4e653139b6 Merge pull request #13117 from woocommerce/fix-12973
Moved refund logic
2017-02-08 16:15:54 -02:00
Claudiu Lodromanean 4525f91223 Merge pull request #13112 from woocommerce/fix-13106
Don't round values in get_on_sale_products
2017-02-08 10:14:52 -08:00
Claudio Sanches 3f2f313161 Merge pull request #13118 from woocommerce/fix-12955
Fix type setting in API
2017-02-08 16:14:05 -02:00
Mike Jolley edbee7db5a Merge pull request #13115 from woocommerce/fix-12811
Define min and max price, not all variation prices, in schema
2017-02-08 18:09:48 +00:00
Mike Jolley 3cf772bcb5 Always use type arg 2017-02-08 18:08:13 +00:00
Mike Jolley eb150724c4 Make sure calculations are redone after setting line items
Closes #13075
2017-02-08 17:23:40 +00:00
Claudiu Lodromanean dce81b4d4e Use store's decimal settings when figuring out what's a sale product 2017-02-08 09:04:13 -08:00
Mike Jolley 11ef37880b Moved logic to wc_create_refund 2017-02-08 16:20:42 +00:00
Mike Jolley 52291e003c wrong method name 2017-02-08 16:20:05 +00:00
Mike Jolley b5572fc041 wc_create_refund should handle payment and stock 2017-02-08 16:19:47 +00:00
Mike Jolley af6ee6d420 Fix; wrong method calls 2017-02-08 16:19:13 +00:00
Mike Jolley c63cec32b9 Fix; prevent duplicate queries 2017-02-08 16:19:01 +00:00
Mike Jolley b391e64453 Fix; Deprecated methods should return 2017-02-08 16:18:42 +00:00
akashsonic cb42768164 Added exit after wp_safe_redirect.
Here not add exit after wp_safe_redirect.
2017-02-08 17:52:06 +05:30
Mike Jolley dd70417758 Fix offset direction for schedule sales cron
Fixes #13105
2017-02-08 12:08:49 +00:00
Mike Jolley 66bceedbf8 Send min and max price, not all variation prices
Closes #12811
2017-02-08 11:40:04 +00:00
Mike Jolley 649f55b494 Load default country/state on edit
Closes #13061 Fixes #12899
2017-02-08 10:56:00 +00:00
Mike Jolley 3b06660edf Merge pull request #12917 from woocommerce/12170-rtl
#12170 Set up RTL generation and enqueuing
2017-02-08 10:29:55 +00:00
Mike Jolley 718149f1d4 Merge pull request #12999 from thenbrent/add_sort_variation_prices
Move price sorting into WC_Product_Variable::sort_variation_prices()
2017-02-08 10:29:30 +00:00
Brent Shepherd a9a83ebae2 Add 'woocommerce_variable_product_synced' filter 2017-02-07 14:05:17 -08:00
Brent Shepherd 81ef55ef42 Add woocommerce_variable_product_sync_before_save
Removing woocommerce_variable_product_nsync filter and $save param.
2017-02-07 13:57:24 -08:00
Claudiu Lodromanean 06c17d6be4 Add whitespace between parens 2017-02-07 13:57:01 -08:00
Brent Shepherd d4ff61814a Deprecate 'woocommerce_variable_product_sync' 2017-02-07 13:51:21 -08:00
Claudiu Lodromanean 8ce5356943 13106 Dont round values in get_on_sale_products 2017-02-07 13:46:00 -08:00
Brent Shepherd dcec16f749 Merge branch 'master' into variable_product_sync_filters
Conflicts:
	includes/class-wc-product-variable.php
2017-02-07 13:43:02 -08:00
Claudiu Lodromanean 173c09dd04 Fix failing tests and array_merge error 2017-02-07 10:46:03 -08:00
Mike Jolley 5888ef5b93 Convert standard to '' in CRUD
Closes #12896
2017-02-07 17:22:04 +00:00
Mike Jolley fcae260b43 Missing placeholder 2017-02-07 17:07:11 +00:00
Mike Jolley 09f2c6b89a Add locale independent wc_get_permalink_structure function 2017-02-07 16:16:45 +00:00
Mike Jolley b08449e502 Payment method display
Fixes #12830
2017-02-07 14:51:21 +00:00
Mike Jolley 4dea9d7b81 Merge pull request #13100 from divadmts/fix-external
External product add_to_cart_text function's hook used
2017-02-07 13:43:54 +01:00
Mike Jolley a4f87293ca Inherit shipping class id from parent 2017-02-07 12:35:24 +00:00
Mike Jolley b14d1ecbc9 Merge pull request #13101 from woocommerce/fix-13051
Exit after redirect to prevent incorrect headers being set by wp_die
2017-02-06 19:12:17 +01:00
Mike Jolley c61b4bf35c wc_add_to_cart_message_html filter which passes in full array of products and qty
Closes #12824
2017-02-06 18:11:54 +00:00
Claudiu Lodromanean e45adc14ed Bring up-to-date with master 2017-02-06 10:10:41 -08:00
Mike Jolley 23cc478bc9 Exit after redirect to prevent incorrect headers being set by wp_die 2017-02-06 17:59:31 +00:00
Mike Jolley b19be41994 Added since to WC_Data docblocks
Closes #13056
2017-02-06 17:06:20 +00:00
divadmts 8df243fdbf
use woocommerce_product_add_to_cart_text hook 2017-02-07 01:04:34 +08:00
Mike Jolley c44fffe35b If woocommerce_adjust_non_base_location_prices is false, remove modded tax, not base tax 2017-02-06 16:56:14 +00:00
Mike Jolley 32d5e3d6f0 Merge pull request #13076 from woocommerce/fix/shipping-total-when-no-shipping-methods
Fix empty string case for `WC_Order::get_total_shipping`
2017-02-06 16:29:20 +01:00
Boro Sitnikovski 5a0b70f291 Fix empty string case for `WC_Order::get_total_shipping` 2017-02-06 14:41:19 +01:00
Mike Jolley 1ef593ff16 Merge pull request #13046 from thenbrent/merge_extra_data
Merge WC_Data::$extra_data in WC_Data::__construct()
2017-02-06 13:08:53 +01:00
Mike Jolley 1f89d2f22e Merge pull request #13063 from thenbrent/remove_unused_param
Remove 'edit' param from calls to WC_Product_Variable::get_visible_children()
2017-02-06 12:55:53 +01:00
Mike Jolley 09f7b0493e Merge pull request #13042 from woocommerce/legacy-order-date-format
Fix legacy order dates format
2017-02-06 12:51:41 +01:00
Mike Jolley 908439c972 Merge pull request #13036 from chrislam/fix/ambiguous-column-names
Added table alias so that the column names in the `ORDER BY` and `GROUP BY` clauses are not ambiguous
2017-02-06 12:51:24 +01:00
Mike Jolley 58118997a9 Merge pull request #13069 from jaydeeprami/Fix-Issue-13067
Fixed issue ref #13067
2017-02-06 12:36:53 +01:00
Jaydeep 91cd899989 Fixed issue ref #13067 2017-02-06 14:35:55 +05:30
Brent Shepherd f768f9f04b Add new variable product sync hook
To provide a way for callbacks to modify the actual instance of the
variable product being sync'd, especially before its saved, in case
it needs to sync some meta data or other prop that can be set on the
object itself.
2017-02-03 15:30:56 -08:00
Brent Shepherd a6bed34358 Remoe unused 'edit' param
To avoid a merge conflict with #13063
2017-02-03 15:10:19 -08:00
Brent Shepherd 7e61cb8a24 Trigger variable product sync hook after save
Because only a product ID is passed to callbacks on 'woocommerce_variable_product_sync',
they will need to instantiate their own instance of the product to do anything useful
with it. This creates a lot of potential for problems given that the product has at that
stage had its data sync'd but not all of it saved. For example, a callback may modify some
meta data on its own instance of the product, then save that, only to immediately have
that overridden if the instance of $product in WC_Product_Variable::sync() also had changes
to that meta data.

Instead, trigger 'woocommerce_variable_product_sync' only after the product has been
saved. This is backward compatible because the hook was triggered at the very end of
the process in WC < 2.7.
2017-02-03 15:01:36 -08:00
Brent Shepherd 8431b2ac86 Remove 'edit' param on get_visible_children()
The WC_Product_Variable::get_visible_children() method accepts no parameters.
2017-02-03 14:53:03 -08:00
Mike Jolley 497b4d986c Merge pull request #13047 from thenbrent/backward_compat_for_email_order_items
Reinstate old show/hide logic for download links and purchase notes in email order item table
2017-02-03 11:02:17 +01:00
Mike Jolley 244b42eae8 Merge pull request #13048 from woocommerce/fix/cart-discount-call
Fix call to non-existent method for cart_discount.
2017-02-03 11:00:54 +01:00
Brent Shepherd 4147935990 Fix undefined index notice in WC_Webhook 2017-02-02 12:52:00 -08:00
Brent Shepherd fe7e280ea0 Reinstate woocommerce_email_order_items_args hook 2017-02-02 12:26:59 -08:00
Claudio Sanches 5eb08aeda6 [REST API] Cast int for batch delete 2017-02-02 19:09:45 +01:00
Mike Jolley 2ec4b8cf7f Revert "Get rating count should use is_array"
This reverts commit 0625a2b759.
2017-02-02 18:43:43 +01:00
Mike Jolley 0625a2b759 Get rating count should use is_array 2017-02-02 18:35:30 +01:00
Boro Sitnikovski 5f05b2e3d8 Fix call to non-existant method for cart_discount. 2017-02-02 09:45:09 +01:00
Brent Shepherd 75bcbbf959 Maintain old show/hide email order item logic
When SHA: 7b3a9b introduced wc_get_email_order_items(), it slightly
changed the logic applied to determine whether to display:
* download links; and
* purchase notes.

In WC 2.6.13 and older, WC_Abstract_Order::email_order_items_table()
would only display download links and purchase note in emails *not*
sent to the admin. This patch preserves that behaviour.
2017-02-01 18:12:21 -08:00
Brent Shepherd 010a208e88 Merge WC_Data::$extra_data in WC_Data::__construct
Rather than requiring child classes to merge it as well as define it.
If it's not defined in a child class, then the merge call will have no
effect as it will be an the empty array set in WC_Data, if they do define
it, WC_Data will now take care of it automatically rather than requiring
manually merging it in the child class's constructor before it has any
effect on that objects data.

This helps reduce duplicate code by removing this from child classes, and
in some cases, being able to remove the child constructor definitions
entirely. It also avoids a gotcha for developers setting their own
$extra_data values only to find they aren't being set on the $data
property.
2017-02-01 12:48:27 -08:00
Mike Jolley e46b256c67 Use cron to send emails to avoid long page load times on checkout 2017-02-01 20:08:18 +01:00
Mike Jolley ed51c8ac13 Pass order object to emails 2017-02-01 17:54:47 +01:00
Mike Jolley 3529d7cafd Cache items 2017-02-01 14:54:18 +01:00
Mike Jolley 31308403d4 Use variables to save values in item crud. 2017-02-01 10:53:53 +01:00
Claudiu Lodromanean 9fadeacfdc Tweak shipping zones button styling to handle RTL better 2017-02-01 10:25:42 +01:00
Claudio Sanches 54e35648e2 Fixed legacy date format 2017-02-01 10:11:19 +01:00
Claudio Sanches 247c9aff50 Merge pull request #13032 from woocommerce/fix/order-date-direct-access
Fix direct access to order_date property
2017-02-01 10:00:06 +01:00
Claudio Sanches 79256504a1 [REST API] Products endpoint fixes, closes #13031 2017-02-01 09:58:04 +01:00
Mike Jolley 3a3588c92c Check product once 2017-02-01 02:11:56 +01:00
Mike Jolley 5a2b07763d Update metadata directly 2017-02-01 02:03:18 +01:00
Mike Jolley 5e2f1de36b get id once 2017-02-01 01:44:16 +01:00
Mike Jolley 2d013eb5be Handle wp prefix in php 2017-02-01 01:43:52 +01:00
Brent Shepherd 7a7c0fbce6 Add WC_Abstract_Order::get_valid_statuses()
So that classes which extend WC_Abstract_Order can define custom statuses
specifically for their order type and have those used for validation in
WC_Abstract_Order::set_status() instead of only the order statuses defined
by wc_get_order_statuses().

For example, the subscription order type has a number of custom order statuses,
like 'wc-active' and 'wc-expired', which do not apply to orders but are valid
statuses for WC_Subscription objects, which extend WC_Abstract_Order.
2017-01-31 15:00:03 -08:00
Chris Lam 502fa930ba Fixes #13035 - Added table alias so that the column names in the `ORDER BY` and `GROUP BY` clauses are not ambiguous 2017-02-01 11:58:54 +13:00
Boro Sitnikovski 58d7e6d940 Fix direct access of order_date property 2017-01-31 17:29:09 +01:00
Mike Jolley 5b221b4ed0 Edit context
#12936
2017-01-31 17:26:49 +01:00
Mike Jolley efcbdc3031 Tweaks for #12805
Closes #12805
2017-01-31 17:25:57 +01:00
Claudiu Lodromanean da22e021f9 Tweak admin tabs CSS to look good in LTR and RTL modes. 2017-01-31 10:09:56 +01:00
Mike Jolley 724f832b40 Fix get_template_loader_files
Fixes #12958
2017-01-31 09:56:27 +01:00
Mike Jolley 22260bfb96 Merge pull request #13021 from Chouby/ajax_wp_die
Use wp_die instead of die in ajax responses
2017-01-31 09:45:46 +01:00
Mike Jolley a4b3244d7b Merge pull request #13028 from woocommerce/fix-13027
Allow password resets when account page isn’t set
2017-01-31 09:45:16 +01:00
Mike Jolley 429b7534bb Merge pull request #13029 from woocommerce/fix-13025
Fix wording on deprecation messages
2017-01-31 09:39:57 +01:00
Mike Jolley dee73d4056 Use edit context on load
Closes #12936
2017-01-31 09:39:19 +01:00
Caleb Burks df7f3533bc Fix wording on deprecation messages 2017-01-30 23:40:21 -06:00
Caleb Burks 9b22886a0d Allow password resets when account page isn’t set 2017-01-30 22:59:32 -06:00
Mike Jolley 55c9554ace Use MDL
Closes #13016
2017-01-30 10:35:47 +01:00
Frédéric Demarle 4075024bb9 Use wp_die intead of die in ajax responses 2017-01-29 21:43:25 +01:00
Frédéric Demarle e03000126e Check SHOP_IS_ON_FRONT existence before defining it 2017-01-29 21:32:26 +01:00
Mike Jolley abe87d9bfa Merge pull request #12967 from woocommerce/fix/variation-get-name
Clean up variation names.
2017-01-27 17:01:34 +00:00
Claudio Sanches 346e1ea1e0 Merge pull request #12996 from woocommerce/rest-api-missing-types-args
REST API Types
2017-01-27 14:49:35 -02:00
Mike Jolley 6a997ec6b2 Merge pull request #13001 from thenbrent/honour_default_checkout_get_value
Honour default checkout_get_value
2017-01-27 16:42:32 +00:00
Mike Jolley 365b456fa5 Make sure product is set. 2017-01-27 16:39:53 +00:00
Claudio Sanches 24a5fe7592 Make WC_REST_Exception extend WC_Data_Exception 2017-01-27 13:52:21 -02:00
Mike Jolley 4abe2b8025 Disable smooth height for #12868 2017-01-27 15:37:35 +00:00
Mike Jolley 46367710ee Default themes get theme support 2017-01-27 15:35:06 +00:00
Claudio Sanches 8c84836423 Merge pull request #12998 from todeveni/patch-3
Cast position as integer
2017-01-27 13:20:52 -02:00
Claudio Sanches 80bc7128be Merge pull request #13002 from thenbrent/fix_undefined_variable_function
Fix "Undefined variable: function" notice
2017-01-27 13:19:07 -02:00
Mike Jolley bf24ba395d Use get_theme_support for gallery features 2017-01-27 14:13:54 +00:00
Brent Shepherd 0e393da2cd Fix woocommerce_order_add_product deprecation msg 2017-01-26 16:58:47 -08:00
Brent Shepherd 5e77311384 Fix deprecated action messages
Don't end sentence with double .. and instead of "Replace with Use CRUD"
just say "Replace with CRUD"
2017-01-26 16:44:28 -08:00
Brent Shepherd 7a77c70d2a Fix "Undefined variable: function" notice
Triggered whenever wc_deprecated_argument() is called in an Ajax request.

Related to #12889
2017-01-26 16:31:11 -08:00
Brent Shepherd 50da0ebd4a Fix default WC_Checkout::get_value() behaviour
Prior to SHA: 43d362d1, WC_Checkout::get_value() would set the default value
for an $input whenever the value after was null after being passed through
filters. This logic changed with SHA: 43d362d1 to *always* return the filtered
value, even if the value was not changed by filters and was still null.

This means if any code filters just one checkout value, like order_comments,
then all other checkout values will default to null, because the has_filter()
check will pass, but the default null value won't be modified by that callback.
2017-01-26 14:47:43 -08:00
Toni Viemerö 2d92bdece6 Cast position as integer
Even though I'm sending `position` as integer in my REST request, it comes through as string value.

```
array (
  'id' => '186',
  'position' => '0',
)
```
2017-01-26 23:08:12 +02:00
Mike Jolley e930ccd16e object types to fix unit tests 2017-01-26 20:58:55 +00:00
Toni Viemerö 2b00615fa2 Remove tilde from i 2017-01-26 22:55:23 +02:00
Brent Shepherd e7e434da4b WC_Product_Variable::sort_variation_prices()
To keep variation sorting logic inside the variable product, and separate
from the database storage logic in WC_Product_Variable_Data_Store_CPT
2017-01-26 12:47:46 -08:00
Mike Jolley 82d7fe6e73 Added more missing args and types 2017-01-26 20:33:39 +00:00
Mike Jolley b727c61da7 Missing arg and setting types 2017-01-26 20:06:18 +00:00
Mike Jolley 2d23705431 ID arg definitions 2017-01-26 19:22:57 +00:00
Mike Jolley def35a5aa2 Cast request ids to int 2017-01-26 18:34:11 +00:00
Jaydeep Rami 615ba59ebb Fixed issue #12986 2017-01-26 23:21:34 +05:30
Justin Shreve 0b1685c76b Remove variation get_name, it will get it from parent. 2017-01-26 07:48:04 -08:00
Justin Shreve 7b1adfb98f Bake out of get_title deprecation changes 2017-01-26 07:46:59 -08:00
Mike Jolley 40e9eabf9f Merge pull request #12983 from woocommerce/get_tax_classes
WC_Tax::get_tax_class_slugs()
2017-01-26 14:10:04 +00:00
Mike Jolley 9eaffcde42 Merge pull request #12980 from woocommerce/fix/payment-token-update-props
When updating payment tokens, only update the props that have changed & fire off a hook of the changed props.
2017-01-26 14:06:44 +00:00
Justin Shreve e176f008b8 Add some comments for the return value of get_tax_classes and get_tax_class_slugs 2017-01-25 13:48:29 -08:00
Justin Shreve 474a307420 Introduce get_tax_class_slugs. 2017-01-25 13:38:13 -08:00
Justin Shreve e8237eab3d Merge pull request #12965 from woocommerce/update/duplicate-product
Update WC_Admin_Duplicate_Product to use CRUD.
2017-01-25 12:18:49 -08:00
Justin Shreve bcae0166fd Fix spacing error, return objects on our new hook, and force sku to be unique when duplicating. 2017-01-25 11:44:27 -08:00
Justin Shreve 32651f638c When updating payment tokens, only update the props that have changed + fire off a hook of the changed props. 2017-01-25 11:05:54 -08:00
Justin Shreve 318046789c Comment clarifying translation wrapper. 2017-01-25 10:40:14 -08:00
Justin Shreve 9889efec75 Catch Product # titles and remove error logs 2017-01-25 10:37:48 -08:00
Justin Shreve f344143b63 Catch variation text and update 2017-01-25 10:27:28 -08:00
Mike Jolley aadc1094e0 Merge pull request #12939 from maximus80/carousel-filter
add animationLoop to woocommerce_single_product_carousel_options filter
2017-01-25 00:47:34 +00:00
Mike Jolley 0df50c59a3 Merge pull request #12972 from woocommerce/log-handler-interface
Add log handler interface
2017-01-25 00:42:50 +00:00
Mike Jolley e9b0fba63c Merge pull request #12953 from pierrebuet/master
Updating the way select2 v4 loads translated strings
2017-01-25 00:22:47 +00:00
Mike Jolley 3a104df5bd Merge pull request #12966 from thenbrent/dry_get_data
Remove redundant WC_Product::get_data() method
2017-01-25 00:12:16 +00:00
Mike Jolley 5746c87580 Merge pull request #12968 from woocommerce/updated-props-action
Fire actions for updated props
2017-01-25 00:10:48 +00:00
Mike Jolley 3afb00da06 Fixed Typo 2017-01-25 00:09:57 +00:00
Mike Jolley ea817a5c88 Merge pull request #12970 from thenbrent/check_variation_post_type
Check post type during read of product variations
2017-01-25 00:08:54 +00:00
Mike Jolley 76f5bc9b79 Merge pull request #12971 from thenbrent/add_read_extra_data
Add WC_Product_Data_Store_CPT::read_extra_data()
2017-01-25 00:08:18 +00:00
Jon Surrell 65b5e4181f Use __METHOD__ over "{$class}::{$method}" 2017-01-24 23:09:24 +01:00
Jon Surrell 2bd8b6efbc Validate handlers implement WC_Log_handler_Interface
Add tests for interface validation.
2017-01-24 23:07:58 +01:00
Mike Jolley 90fd0da7d0 Fire actions for updated props 2017-01-24 21:38:02 +00:00
Brent Shepherd 49095f0a6c Check post type during read of product variations
Continuation of #12795
2017-01-24 12:28:02 -08:00
Brent Shepherd f2cb083bd6 Read extra data for variation products
So that classes can extend WC_Product_Variation and use the existing
WC_Product_Variation_Data_Store_CPT class, rather than having to create
a new data store class to set the WC_Product_Variation::$extra_data
values.
2017-01-24 12:20:15 -08:00
Brent Shepherd 56c427acba Add WC_Product_Data_Store_CPT::read_extra_data()
So that a product's $extra_data can also be read by child classes of
WC_Product_Data_Store_CPT, like WC_Product_Variation_Data_Store_CPT,
without duplicating the code to read it.
2017-01-24 12:18:35 -08:00
Justin Shreve 2b464d2e52 Deprecate get_title and it's hook, use get_name instead and pull name from parent. 2017-01-24 12:10:36 -08:00
Justin Shreve 10d3e2d580 Update WC_Admin_Duplicate_Product to use CRUD. 2017-01-24 11:57:48 -08:00
Justin Shreve dcecf0f228 Fix get_hook_prefix format 2017-01-24 11:02:06 -08:00
Brent Shepherd 2cf401f60f Delete WC_Product::get_data()
It's identical to WC_Data::get_data(), which is already inherited from
WC_Abstract_Legacy_Product (which extends WC_Data::get_data()).
2017-01-24 10:44:51 -08:00
Justin Shreve 2cdf950963 Merge pull request #12950 from woocommerce/fix/meta-update
Data Stores & update_post_meta: Update changed & keys that don't exist.
2017-01-24 07:14:54 -08:00
Jon Surrell 8e0f40d3d1 Add WC_Log_Handler_Interface
Abstract class `WC_Log_Handler` implements interface
2017-01-24 14:10:05 +01:00
Mike Jolley eb2b9d78f8 Merge pull request #12947 from woocommerce/improve-rest-api-error-data
Allow pass error data using WC_Data_Exception
2017-01-24 12:45:49 +00:00
Justin Shreve 711a381ff6 Remove error log 2017-01-23 13:16:49 -08:00
Claudio Sanches f345285c2e Merge pull request #12951 from woocommerce/emails-using-site-language
Send emails using site language
2017-01-23 19:10:39 -02:00
Justin Shreve 3d55efffac Move order logic to wc-order 2017-01-23 13:08:55 -08:00
pierrebuet 41a937041d Updating the way select2 v4 loads translated strings
Correcting Issue #12952.

In select2 v4 the callback functions used to format the messages have
changed their names and the structure of the options have changed,
using now a „language“ object.

I was not able to find a reference in the select2 v4 code how to format
the number of matches back. Further when using v4 I don’t see any
indication on the number of the number of returned matches, so I
consider the parameter as obsolete.
2017-01-23 22:04:52 +01:00
Claudio Sanches c94bb423f5 Merge pull request #12944 from woocommerce/fix-product-categories-parent
[REST API] Fixed PHP notices while trying to set product category parent as 0
2017-01-23 18:46:10 -02:00
Claudio Sanches 3e60bd64de Send emails using site language, closes #12931 2017-01-23 18:40:36 -02:00
Justin Shreve 1ab0b34926 Fix meta handling logic for update_post_meta: Only update keys that have changed or don't exist. 2017-01-23 12:20:29 -08:00
Brent Shepherd 1ac2c1a94f Move price hash to separate function
So that it can be used by child classes without copy/pasting code.
2017-01-23 11:57:49 -08:00
Claudio Sanches bac0b299c4 Include conflicted product ID when trying to create a product with duplicated SKU 2017-01-23 17:34:49 -02:00
Claudio Sanches cdf59d6f68 E[REST API] Use WC_Data_Exception->getErrorData 2017-01-23 17:32:33 -02:00
Claudio Sanches e23ddabfea Allow WC_Data_Exception have extra error data 2017-01-23 17:29:16 -02:00
Claudio Sanches 03b34fb738 [REST API] Improved messages for term_exists error 2017-01-23 17:07:36 -02:00
Jon Surrell 72f4bcc292 Protect WC_Logger::should_handle
This method should not be public. It is not part of WC_Logger_Interface, and leaving it
public could cause problems
2017-01-23 19:59:01 +01:00
Claudio Sanches 10a9baeada [REST API] Fixed PHP notices while trying to set product category parent as 0 2017-01-23 16:44:22 -02:00
Claudio Sanches 09123c9fc8 Merge pull request #12926 from woocommerce/fix-12910
Use mb_ functions in wc_get_wildcard_postcodes
2017-01-23 15:48:59 -02:00
Claudiu Lodromanean 97497e3104 12170 Update doc blocks with new params 2017-01-23 07:54:14 -08:00
Maximus80 21a14b8636 add animationLoop to woocommerce_single_product_carousel_options filter 2017-01-23 14:24:39 +01:00
Mike Jolley 1e9659b235 Merge pull request #12884 from kreamweb/master
Fix: usermeta table name, in a multisite the usermeta table is common…
2017-01-23 11:54:59 +00:00
Mike Jolley 66914966fb Adjust meta saving code throughout
#12885
2017-01-23 11:30:53 +00:00
Mike Jolley d8bd80fbb7 Merge pull request #12885 from woocommerce/fix/shipping-rate-meta-data
Add shipping rate meta data to line item
2017-01-23 10:53:24 +00:00
Mike Jolley cd05b94ec3 woocommerce_admin_process_product_object hook 2017-01-23 10:20:11 +00:00
Mike Jolley ba7513ed82 wc_format_decimal should remove % symbols
Fixes #12893
2017-01-22 01:35:14 +00:00
Mike Jolley f0049367ae Use mb_ functions and add tests 2017-01-22 01:24:20 +00:00
Brent Shepherd ff627b31f6 Make variable data store private methods protected
So they can be inherited by other variable product types, like
variable subscriptions.
2017-01-20 11:09:49 -08:00
Claudiu Lodromanean 754a12c88a 12170 Set up RTL generation and enqueuing 2017-01-20 10:29:48 -08:00
Mike Jolley 90764253bc Merge pull request #12903 from thenbrent/fix_wc_paying_customer
[2.7] Fix wc_paying_customer() refund check
2017-01-20 10:45:22 +00:00
Mike Jolley fa9fed4e4d Merge pull request #12908 from thenbrent/fix_refund_data_store_read
[2.7] Fix WC_Order_Refund_Data_Store_CPT::read() and Abstract_WC_Order_Data_Store_CPT's support for other custom order types
2017-01-20 10:44:18 +00:00
Mike Jolley f44b4f6e9f Merge pull request #12907 from thenbrent/get_order_count_param
[2.7] Fix name of get_order_count() param
2017-01-20 10:43:06 +00:00
Mike Jolley e8115c654d Merge pull request #12905 from thenbrent/use_wc_format_price_range
[2.7] Fix get_price_html_from_to() deprecation
2017-01-20 10:42:29 +00:00
Mike Jolley fc02cc80a8 Merge pull request #12888 from woocommerce/get_order_id_by_order_item_id
Add method for getting order id from order item id.
2017-01-20 10:39:13 +00:00
Mike Jolley b2e6fa8c4e Merge pull request #12897 from hannahswain/master
Update capitalization on "Visit store" menu link
2017-01-20 10:38:48 +00:00
Mike Jolley d757b85167 Merge pull request #12883 from woocommerce/order-tracking-messages
Use notices functions in order tracking
2017-01-20 10:38:02 +00:00
Brent Shepherd c8f003d5b0 Fix WC_Order_Refund_Data_Store_CPT::read()
Abstract_WC_Order_Data_Store_CPT::read() hardcoded its validation against
the 'shop_order' post type. However, custom order types created via the
wc_register_order_type() API can use different post types. For example,
refunds have the post type: 'shop_order_refund'.

This patch changes the Abstract_WC_Order_Data_Store_CPT::read() validation
to check that the post type is any of the registered order types.

This fixes refunds and 3rd party custom order types, like subscriptions.
2017-01-19 16:18:42 -08:00
Brent Shepherd f9569df1ee Fix naming of get_order_count() param
The parameter is actually an order status, not type.
2017-01-19 15:40:20 -08:00
Brent Shepherd a1cd7eee42 Fix get_price_html_from_to() deprecation
WC_Product::get_price_html_from_to() was incorrectly using
wc_format_sale_price() as its replacement in WC 2.7; however,
wc_format_price_range() is a more suitable replacement.
2017-01-19 13:51:23 -08:00
Brent Shepherd 3f338cd3e1 Fix wc_paying_customer() refund check
wc_paying_customer() needs to check against 'shop_order_refund', which is
the actual return value of WC_Order_Refund::get_type(). No object will return
'refund', so a customer would always be declared as a paying customer even
for refund orders.
2017-01-19 11:16:43 -08:00
Justin Shreve 98343ffe26 Fix docblocks and cast the order ID as int after our query. 2017-01-19 09:38:23 -08:00
Justin Shreve a1446c9591 Add method for getting order id from order item id. 2017-01-19 09:30:19 -08:00
Hannah Swain c22b1d766a Update class-wc-admin-menus.php
Capitalize "s" in "Visit store" to match case on "Visit Site".
2017-01-19 14:47:29 +01:00
Claudio Sanches 9d513737ed Merge pull request #12887 from woocommerce/fix/order-item-type-array
Return order item type if accessed via array.
2017-01-18 20:43:25 -02:00
Justin Shreve 663a096429 Return order item type if accessed via array (bw compat). 2017-01-18 13:49:12 -08:00
Nabeel Sulieman 3c8ce9b494 Add shipping rate meta data to line item 2017-01-18 10:41:32 -08:00
Claudio Sanches bff95262cb Changelog for 2.6.13 2017-01-18 16:20:48 -02:00
Claudio Sanches d536d15652 Merge branch 'master' of github.com:woocommerce/woocommerce 2017-01-18 16:01:02 -02:00
Claudio Sanches f54e9e1e1a Fixed coding standards 2017-01-18 15:16:01 -02:00
emanuela castorina c4c78442cf Fix: usermeta table name, in a multisite the usermeta table is common to all sites 2017-01-18 18:11:21 +01:00
Claudio Sanches fe97e1f5b3 Merge pull request #12866 from woocommerce/wc_get_orders_before_and_after_date
Add before and after date arguments to wc_get_orders
2017-01-18 14:52:51 -02:00
Claudio Sanches ddc8ce93a4 Use notices functions in order tracking, closes #12874 2017-01-18 14:45:20 -02:00
Claudio Sanches 11035ba4d7 Fixed "stock increase" string placeholders, closes #12873 2017-01-18 14:34:52 -02:00
Mike Jolley f9f6ac175b Merge pull request #12865 from woocommerce/remove-default-instructions
Removed default instructions
2017-01-18 10:31:21 +00:00
Justin Shreve b660eda4b8 Add date searching to wc_get_orders. 2017-01-17 12:52:27 -08:00
Claudio Sanches ac3d847a16 Fixed file permissions 2017-01-17 16:31:31 -02:00
Claudio Sanches 61b39c206f Removed default instructions, closes #12853 2017-01-17 16:11:49 -02:00
Mike Jolley 17481af671 Allow html in description 2017-01-17 15:50:19 +00:00
Mike Jolley cb04d5985a Fix add zone button and default title
Fixes #12829
2017-01-17 15:25:12 +00:00
Mike Jolley d92447713a Merge pull request #12852 from woocommerce/fix-terms-ordering
Restore attributes ordering
2017-01-17 12:28:41 +00:00
Mike Jolley a276d459ed Merge pull request #12851 from woocommerce/rest-api-search-by-multiple-skus
[REST API] Allow search by multiples SKUs
2017-01-17 12:22:39 +00:00
Mike Jolley 4eac304388 Merge pull request #12814 from woocommerce/fix-product-variable-filters
Remove deprecation notices on woocommerce_get_children
2017-01-17 10:19:17 +00:00
Claudio Sanches bd655af072 Restore attributes ordering, closes #12847 2017-01-16 21:11:56 -02:00
Claudio Sanches c001b508d5 Merge branch 'master' into fix/stock-bulk 2017-01-16 20:41:33 -02:00
Claudio Sanches 3d352a680c [REST API] Allow search by multiples SKUs 2017-01-16 20:35:55 -02:00
Claudio Sanches 20032fd170 Fixed declaration of is_on_sale() compatible with WC_Product::is_on_sale 2017-01-16 19:59:53 -02:00
Claudio Sanches fbfb195f2f Fixed interfaces file names and location 2017-01-16 19:33:21 -02:00
roykho 11d0d26df7
Fix typo on variable when it should be 2017-01-16 12:54:59 -08:00
Justin Shreve fab2e52bdd Remove deprecation filters. 2017-01-16 11:06:25 -08:00
Justin Shreve 3e92ec9d59 Fix stock updating on bulk edit. 2017-01-16 10:57:14 -08:00
Justin Shreve cabff4fe28 Fix stock, virtual, and featured checks by passing correct data to quick-edit.js 2017-01-16 09:59:56 -08:00
Justin Shreve b7305b835d Merge pull request #12835 from franticpsyx/update-price-meta-context
[2.7] Prices retrieved in 'edit' context when writing meta
2017-01-16 08:52:24 -08:00
Manos Psychogyiopoulos 892d5da7e9 get prices in 'edit' context when updating meta 2017-01-16 17:33:30 +02:00
Jon Surrell 7822c38a2c Accept object from woocommerce_logging_class filter
The filter `woocommerce_logging_class` allows replacement of the
built in `WC_Logger` as the shared logger. However, we statically
instantiate the classname as `$logger = new $class`. This prevents
use of any class which needs to be instantiated with arguments.

This change allows the `woocommerce_logging_class` filter to provide
an object which will be used as the shared logger.
2017-01-15 13:41:21 +01:00
Claudio Sanches 366011ab20 Defined context for shipping packages names 2017-01-15 01:46:02 -02:00
Claudio Sanches 08644c6f42 Missing space 2017-01-15 00:21:02 -02:00
Jon Surrell ef9624efff Ensure filter provided logging class implements WC_Logger_Interface 2017-01-14 18:39:40 +01:00
Jon Surrell 144ea5d5ab Include WC_Logger_Interface on startup 2017-01-14 17:58:24 +01:00
Jon Surrell bd090749ec Add WC_Logger_Interface
`class WC_Logger implements WC_Logger_Interface`.

The built-in logger can be replaced "globally" (when
provided via `wc_get_logger`) by using the filter
`woocommerce_logging_class`. This interface should make replacing
`WC_Logger` easier and safer.
2017-01-14 17:43:15 +01:00
Claudio Sanches 022d4fdac4 Coupon expiry date do not allow multiple date formats 2017-01-14 00:10:51 -02:00
Claudio Sanches a5055ec2cf Merge pull request #12815 from woocommerce/fix-tool-command-notice
Fix notice that displays when activating WC via the command-line.
2017-01-13 22:52:33 -02:00
Justin Shreve 9dc38fcee0 Fix notice that displays when activating WC via the command-line. 2017-01-13 10:47:10 -08:00
Claudio Sanches 12481a2be7 Merge pull request #12808 from woocommerce/restore-logger-rm-clear
Restore WC_Logger remove and clear functionality
2017-01-13 13:14:27 -02:00
Jon Surrell 5d7665671c Remove WC_Logger::remove
This method was added post 2.6 and does not need to be maintained/deprecated.
Remove related test.
2017-01-13 06:48:57 +01:00
Jon Surrell 78a6ed4d44 Restore remove and clear functionality to WC_Logger
Maintain backwards compatibility of removing or clearing files.
2017-01-12 22:13:42 +01:00
Jon Surrell a2dea96430 Add message when get_log_file_path called too early 2017-01-12 22:02:31 +01:00
Claudio Sanches 9c27661dea Synchronized with master 2017-01-12 17:53:15 -02:00
Jon Surrell e8fd29520f Un-deprecate wc_get_log_file_path 2017-01-12 20:39:39 +01:00
Claudio Sanches 9f1e0c46fa Fixed wc_get_product_terms() when using menu_order ordering 2017-01-11 16:14:28 -02:00
Mike Jolley 91c68d211f Merge pull request #12798 from woocommerce/orphan-variations-fix-12614
Orphan variations fix
2017-01-11 16:23:14 +00:00
Mike Jolley 748db4e675 Defer flush so CPT is updated before flush.
Fixes #12787
2017-01-11 16:12:00 +00:00
Mike Jolley ba8f308100 Merge branch 'master' into orphan-variations-fix-12614
# Conflicts:
#	includes/class-wc-post-data.php
2017-01-11 15:42:20 +00:00
Mike Jolley dc82ea9c77 Add some functions to handle unique sku after untrash 2017-01-11 15:41:31 +00:00
Mike Jolley 80f79ae98d Trash and untrash variations handling
Fixes #12774
2017-01-11 15:41:19 +00:00
Claudio Sanches fff98a9fbd Removed more legacy $woocommerce variable 2017-01-11 13:31:31 -02:00
Claudio Sanches 612b54f0df Removed dead $woocommerce variable 2017-01-11 13:29:34 -02:00
Mike Jolley de11be2b6c space 2017-01-11 12:37:03 +00:00
Mike Jolley 9706104128 Fix test case 2017-01-11 12:33:38 +00:00
Mike Jolley b240e10b91 Merge branch 'pr/12756' 2017-01-11 12:19:30 +00:00
Mike Jolley 3e31f2f361 Syntax 2017-01-11 12:19:23 +00:00
Mike Jolley 11015c4b06 Pass products around and change how wc_format_stock_for_display gets called so $product is available. 2017-01-11 12:17:18 +00:00
Mike Jolley 8e7687b9fc Add method to delete variations 2017-01-11 11:48:39 +00:00
Mike Jolley b749b654bc Fire action on type change 2017-01-11 11:48:31 +00:00
Mike Jolley 19913f4d6c Handle variation type change event 2017-01-11 11:48:22 +00:00
Mike Jolley 61ce6a2d21 remove notice text 2017-01-11 11:48:11 +00:00
Mike Jolley 4e12ca6332 Merge pull request #12775 from kahanit/patch-1
Actions on delete of zone and zone method
2017-01-11 11:06:42 +00:00
Mike Jolley 8212611307 Merge pull request #12795 from woocommerce/check-post-type
Check post type during read of coupons, posts, and products.
2017-01-11 11:05:10 +00:00
Chouby 1a1a152e2e Fix duplicate_post_taxonomies() when using non unique slugs
Since WP 4.3, it is possible to use non unique terms slugs in the same taxonomy. Currently duplicate_post_taxonomies() uses the term slug in wp_set_object_terms(), thus may set a wrong term. I propose to use term_id instead, which ensures that the correct term is set.
2017-01-11 09:32:12 +01:00
Justin Shreve cddcb7841e Check post type during read of coupons, posts, and products. 2017-01-10 14:43:33 -08:00
Claudio Sanches 7d090957c8 Merge pull request #12794 from shivapoudel/wc-pages
Tweak - Exclude profile pages from WC pages
2017-01-10 16:37:12 -02:00
Shiva Poudel 8171c73e9b Tweak - Exclude profile pages from WC pages using array_diff 2017-01-10 21:55:11 +05:45
Mike Jolley 00250e8eab Fix date query format 2017-01-10 15:50:05 +00:00
Claudio Sanches 4b3c44fea3 Merge pull request #12791 from mattallan/system_status_endpoint_editable
Make the `GET /system_status` API response more customisable
2017-01-10 12:30:35 -02:00
Mike Jolley 451199a388 Hooks when creating refunds 2017-01-10 14:14:05 +00:00
Mike Jolley 5bfb372f01 Customer update hook 2017-01-10 14:14:05 +00:00
Mike Jolley b97f6c9eb1 wc_bool_to_string handling for 'true' 2017-01-10 14:14:05 +00:00
matttallan c45d81e650 Make the system_status GET endpoint more customisable 2017-01-10 16:06:09 +10:00
Diego Zanella de02645544 Improved filter `woocommerce_layered_nav_link`
* Added term and taxonomy as additional parameters.
2017-01-09 19:27:01 +00:00
Claudio Sanches ca47661388 Fixed WC_Product::get_price_html_from_text deprecated message, closes #12779 2017-01-09 15:52:17 -02:00
Manos Psychogyiopoulos 022fbe4183 add 'include' arg to wc_get_products 2017-01-09 14:10:47 +02:00
Manos Psychogyiopoulos bffdc27e8c fix variation attributes display in stock reports 2017-01-09 12:03:08 +02:00
Jon Surrell acd338fb87 Add default source to WC_Log_Handler_DB 2017-01-08 21:42:56 +01:00
Jon Surrell f1a90d6b05 Move level filters to dropdown
Drop table list "views" and use dropdown filter for sources and levels.
2017-01-08 19:32:53 +01:00
Jon Surrell a992084776 Sort by timestamp by default 2017-01-08 18:55:21 +01:00
Jon Surrell 0aab3282f4 Add more sanitizing
These values should be controlled, but additional sanitization is preferable.
2017-01-08 18:53:01 +01:00
Amit Sidhpura 887aa5fe1b sorry change zone in action to shipping_zone 2017-01-07 11:16:31 +05:30
Amit Sidhpura 8de220beeb Actions on delete of zone and zone method
Hooks on delete of zone and zone method.
I have named it 'woocommerce_delete_zone' and 'woocommerce_delete_zone_mehod' making it same format as customer delete action
'woocommerce_delete_customer'.
2017-01-07 11:10:36 +05:30
Kathy Darling 8d4844a31c space after parens 2017-01-06 14:39:02 -05:00
Mike Jolley 66c3cff76d More escaping 2017-01-06 14:09:36 +00:00
Mike Jolley 76f8c3dddd Escaping for scruitinizer 2017-01-06 12:45:28 +00:00
Mike Jolley 54352de9b4 Merge pull request #12767 from woocommerce/deprecated-actions
Add hooks when error_logging deprecation notices on AJAX calls.
2017-01-06 12:05:16 +00:00
Mike Jolley f03e09e791 Comment 2017-01-06 11:59:05 +00:00
Justin Shreve 39fe17ec45 Add hooks when error_logging deprecation notices on AJAX calls. 2017-01-05 10:54:10 -08:00
Mike Jolley f7d72afcf9 Detect classname when saving attributes 2017-01-05 16:54:47 +00:00
Mike Jolley ee7ee26278 Add static method to get a filtered product classname 2017-01-05 16:54:33 +00:00
Mike Jolley 813ec28c7b Remove type check in link_all_variations 2017-01-05 16:17:46 +00:00
Mike Jolley fdbb36bb93 Support deprecated args again 2017-01-05 16:16:19 +00:00
Jon Surrell d38e22329f Replace count with empty check 2017-01-05 16:33:58 +01:00
Jon Surrell e6bcc1aeb6 Replace 'All' with 'All sources' in dropdown 2017-01-05 16:23:03 +01:00
Mike Jolley 17f78d9668 Fallback to full image
Closes #12759
2017-01-05 14:31:04 +00:00
Mike Jolley f7abf29f25 Merge pull request #12754 from woocommerce/sync-variation-names-12707
Sync variation names
2017-01-05 12:15:06 +00:00
Justin Shreve e4937b898d Fix PHP 7.1 warnings/notices. 2017-01-04 10:45:45 -08:00
Kathy Darling ff0926aa2d use wc_format_stock_quantity_for_display() to wrap stock quantity numbers for front end display. closes #12753. 2017-01-04 12:25:28 -05:00
Mike Jolley 5dba3d5bfe Sync variation names 2017-01-04 15:18:02 +00:00
Mike Jolley ec41ba9ff0 delete, don't trash, variations 2017-01-04 14:05:13 +00:00
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