Commit Graph

20635 Commits

Author SHA1 Message Date
Cesar Rodas 8c64631041 Remove whitespace added by mistake 2017-04-26 02:59:16 -04:00
Cesar Rodas d3fd16617c Improved phpdoc 2017-04-26 02:57:00 -04:00
Cesar Rodas 38f379a7d7 Make get_item() consistent (like get_items())
Right now get_item() is loading an item from the database directly. It doesn't
take advantage of our cache and it doesn't check if the item is already loaded in memory.

There is also another bug (or feature?) that it will let you load any item, even if the item is not related to the current order. I believe this is a bug, if somebody really wants to load any item regardless of the order they should use `WC_Order_Factory::get_order_item`.

Another bug is that items loaded with get_item() are not related to the order object, therefore any calls to Order::save() won't persist the changes made to the item.

This commits makes sure the item returned by get_item is loaded similarly like get_items() does, taking advantage of the cache and the $items protected property (chances are the item is already in memory, ready to be used).

If a given item is not found false will be returned. If item exists but it is not related to the current object it will return false as well (If this behaviour is wanted, I can easily change it load the item anyways instead of returning false).
2017-04-26 02:54:14 -04:00
Claudio Sanches 3bae94e78d Merge pull request #14676 from woocommerce/fix/14665
Sort grouped products by menu order
2017-04-25 14:37:32 -03:00
Claudio Sanches c426d46bd1 Merge pull request #14648 from woocommerce/fix/14581
Fix missing title for actions column
2017-04-25 14:33:40 -03:00
Claudio Sanches 0c6a61df02 Merge pull request #14682 from woocommerce/fix/14679
Legacy customer class missing get_address / get_address_2 functions
2017-04-25 12:45:49 -03:00
Claudio Sanches 10880ab680 Merge pull request #14685 from woocommerce/fix/14592
Filter invalid products before returning them for wc_get_products
2017-04-25 12:45:17 -03:00
Claudio Sanches a177c22e2d Merge pull request #14687 from woocommerce/fix/14660
Prevent orders being their own parent (!)
2017-04-25 12:44:40 -03:00
Claudio Sanches cdbfce30fa Merge pull request #14664 from woocommerce/fix/14126
Added deprecated notice to WC_Order_Item_Meta
2017-04-25 12:37:44 -03:00
Mike Jolley a27e03378f update test 2017-04-25 14:46:17 +01:00
Mike Jolley 9923612832 Prevent orders being their own parent (!)
Closes #14660
2017-04-25 14:18:27 +01:00
Mike Jolley 8e624e6230 Filter invalid products before returning them for wc_get_products
Closes #14592
2017-04-25 14:03:30 +01:00
Mike Jolley 943e6a4d54 Merge pull request #14684 from woocommerce/pr/14616
Fixes for #14616
2017-04-25 13:53:18 +01:00
Mike Jolley 7269fde94f Moved reg handlers 2017-04-25 13:51:52 +01:00
Mike Jolley 2f99502ab3 Merge pull request #14663 from woocommerce/feature/include-phpunit
Included PHPUnit to composer.json and removed old dependencies
2017-04-25 13:46:31 +01:00
Mike Jolley 27993c0c50 Legacy customer class missing get_address / get_address_2 functions
Fixes #14679
2017-04-25 13:18:58 +01:00
Mike Jolley 763c8e8018 Sort grouped products by menu order
Fixes #14665
2017-04-25 12:08:17 +01:00
Claudio Sanches 1314b6845e Merge pull request #14432 from emgk/fix-14428
added new filter for product thumbnail size.
2017-04-24 21:05:27 -03:00
Claudio Sanches d71633cad7 Included PHPUnit to composer.json and removed old dependencies 2017-04-24 20:56:43 -03:00
Claudio Sanches 2d9e876e6d Removed deprecated WC_Order_Item_Meta from REST API v1 2017-04-24 20:55:09 -03:00
Claudio Sanches 4ded36c66d Allow get all formatted meta data values 2017-04-24 20:27:17 -03:00
Claudio Sanches 6f3b6a2b74 Include deprecated notice in WC_Order_Item_Meta constructor 2017-04-24 20:26:43 -03:00
Claudio Sanches 89dc3b40e2 Merge pull request #14651 from woocommerce/fix/14646
Allow forward slash in tel
2017-04-24 13:56:16 -03:00
Mike Jolley 04e07795fc Allow forward slash in tel
Closes #14646
2017-04-24 15:24:37 +01:00
Mike Jolley ac74f17d7f Merge pull request #14645 from aelia-co/Fix-Restore_Checkout_User_Filter
Restored filter during checkout validation
2017-04-24 15:22:11 +01:00
Mike Jolley 69838b2f4b Fix missing title for actions column
Closes #14581
2017-04-24 15:20:20 +01:00
Diego Zanella 19aa807da6 Restored filter `woocommerce_checkout_customer_id` during checkout validation 2017-04-24 14:41:23 +01:00
Mike Jolley 6afc566de4 Merge pull request #14609 from bekarice/fix/modal-tooltip-display
Fix help tip display with shipping zone modals
2017-04-24 14:16:40 +01:00
Mike Jolley fc1f61f23d Update master changelog
Closes #14628
2017-04-24 09:54:32 +01:00
mdrahul 521ad697b0 fix Invalid argument supplied error, ref #14615 2017-04-22 17:24:30 +05:30
Beka Rice 344269c267 Fix tooltip display with shipping zone modals 2017-04-21 16:22:14 -04:00
Mike Jolley 5ec767adbf Merge pull request #14593 from woocommerce/fix-contributing-link
Fix link in Contributing wiki
2017-04-21 12:36:51 +01:00
Konstantin Kovshenin bba3609786 Fix a doc link in Contributing wiki
The "GitHub pull request documentation" leads to a 404.
2017-04-21 14:33:33 +03:00
Claudio Sanches e96a1eb744 Merge pull request #14577 from woocommerce/fix/14575
wc_get_orders support for guest orders and unit tests
2017-04-20 14:31:59 -03:00
Mike Jolley a325d03deb wc_get_orders support for guest orders and unit tests
Fixes #14575
2017-04-20 18:05:58 +01:00
Claudio Sanches 836b3a3162 Merge pull request #14553 from woocommerce/fix/14544
Check if is a resource before try set log rotate
2017-04-20 13:47:56 -03:00
Claudio Sanches 1142ca20f0 Properly open log files 2017-04-20 13:37:18 -03:00
Claudio Sanches 46b17d7eb3 Merge pull request #14574 from woocommerce/fix/breadcrumb-check
Abort generate_breadcrumblist_data is there are no crumbs
2017-04-20 13:06:50 -03:00
Mike Jolley d5205b97f8 Abort generate_breadcrumblist_data is there are no crumbs 2017-04-20 17:04:48 +01:00
Claudio Sanches dfcbeaf044 Fixed logic in `is_open()` 2017-04-20 12:57:33 -03:00
Claudio Sanches 7f6b0c6d0f Moved resource check for `is_open()` method 2017-04-20 12:53:44 -03:00
Claudio Sanches ab3a8c4a79 Merge pull request #14573 from woocommerce/fix/14543
define get_user_id/get_user methods for bw compat
2017-04-20 12:28:10 -03:00
Mike Jolley 4a6c87d1cc docblock 2017-04-20 16:03:40 +01:00
Mike Jolley 8e28af8b87 define get_user_id/get_user methods for bw compat
Closes #14543
2017-04-20 16:02:10 +01:00
Claudio Sanches 8cb1fa2aff Merge pull request #14570 from woocommerce/fix/14546
Decrease paypal request timeout so failed requests to not take too long
2017-04-20 11:51:21 -03:00
Mike Jolley f8781b9552 Decrease paypal request timeout so failed requests to not take too long
Closes #14546
2017-04-20 15:45:52 +01:00
Mike Jolley 8bc715ca59 Merge pull request #14556 from woocommerce/SiR-DanieL-patch-1
Add filter wc_is_attribute_in_product_name
2017-04-20 15:07:42 +01:00
Mike Jolley 1924291f37 woocommerce_is_attribute_in_product_name 2017-04-20 15:07:06 +01:00
Mike Jolley 3ef5ad2565 Merge pull request #14566 from woocommerce/fix/14563
Better email handling when invalid
2017-04-20 14:48:24 +01:00
Mike Jolley bb4507bcae Better email handling when invalid 2017-04-20 14:45:04 +01:00