Commit Graph

36095 Commits

Author SHA1 Message Date
vedanshujain 53f81a1702 Cover missed cases 2020-09-14 16:42:33 +05:30
vedanshujain 2d2c764c89 Pass request in backward compatible way 2020-09-14 16:42:33 +05:30
vedanshujain e78c592b25 Cache return fields for perfromance 2020-09-14 16:42:33 +05:30
vedanshujain 8e4a9ebb77 Fetch expensive fields only when required for performance 2020-09-14 16:42:33 +05:30
vedanshujain 24baf27570 Use core so that any future improvements need to be done in one place.
Right now controller creates and executes its own query, whereas core already has a way to execute this. So it makes sense to use so that we would have to do any future improvement in one place.
2020-09-14 16:42:33 +05:30
vedanshujain d560e73fce Set key before trying to add values 2020-09-14 15:27:56 +05:30
vedanshujain 2db126f22f Use CacheHydration to speed up fetching Order data.
This also primes various caches by fetching data well in advance, this would have been individual SQL queries otherwise.
2020-09-14 15:27:56 +05:30
vedanshujain ff996388c8 Add support for fetching collection 2020-09-14 15:27:56 +05:30
vedanshujain 31ad8d651a Refactor `read_meta` into filter_raw_data for better re-usability. 2020-09-14 15:27:56 +05:30
vedanshujain 0a9f04f73d Removed unused file 2020-09-14 15:27:56 +05:30
vedanshujain 213397ffef Add support to prime refund cache in wc_order class.
Fetching refunds call is an expensive query, so priming the cache where possible could be beneficial for better performance.
2020-09-14 15:27:56 +05:30
vedanshujain b753189f64 Add support to use `cache_hydration` in wc_get_order.
This can be used to pre-load expensive to compute caches.
2020-09-14 15:27:56 +05:30
vedanshujain 86c6db0913 Support for order_item to be init from obj with `order_item_id` prop.
Also set metadata cache if metadata prop is present in initial item.
2020-09-14 15:27:56 +05:30
vedanshujain a50d38fd41 Add support for fetching order using a hydration object.
It will ultimately be on the datastore to effectively use the hydration object.
2020-09-14 15:27:56 +05:30
vedanshujain 16fa0c7262 Refactor method to get individual class names for order and order-items.
This is done so that methods that fetch class names can be re-used.
2020-09-14 15:27:56 +05:30
vedanshujain 72bae332d1 Refactor methods to break down into smaller units for re-usability.
This commit breaks down `read_meta_data` so that individual methods for cache key and setting raw meta data can be reused.

Also adds set_meta_data_from_raw_data to initialize metadata from manual cache.
2020-09-14 15:27:55 +05:30
vedanshujain 093c4e72f4 Add CacheHydration to facilitate storing of various caches.
Objects of this class will be used to store different cached values for objects like orders, products etc in bulk.
2020-09-14 15:27:55 +05:30
Rodrigo Primo 9bdafbeb18
Merge pull request #27219 from woocommerce/fix/filter-quantity-in-add_to_cart_handler_grouped
Filter quantity in add_to_cart_handler_grouped
2020-09-12 15:56:49 -03:00
Rodrigo Primo ce656ebec4
Merge pull request #27217 from manutheblacker/master
Adding states for Benin(BJ) country 🇧🇯
2020-09-12 15:55:05 -03:00
Rodrigo Primo d74780f824
Use codes and names from CLDR for Benin subdivisions
Source: https://github.com/unicode-org/cldr/blob/master/common/subdivisions/en.xml#L521

Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2020-09-12 15:27:48 -03:00
Rodrigo Primo c0a1e46d01
Merge pull request #27075 from passatgt/master
Rename Csongrád state to Csongrád-Csanád
2020-09-12 15:20:00 -03:00
Rodrigo Primo a24937556a
Merge pull request #27658 from woocommerce/update/4.6.0-dev
Prepare master for 4.6.0 development
2020-09-12 11:18:22 -03:00
Rodrigo Primo f345a1e0c8
Merge pull request #27615 from woocommerce/fix/26590
Fix bug when using tax classes with some non-ASCII characters
2020-09-11 14:48:10 -03:00
Rodrigo Primo d7b2207e75
Merge pull request #27610 from attitude/patch-1
Encapsulate scope of `c` variable
2020-09-11 14:27:06 -03:00
Rodrigo Primo fd25815a7c Prepare master for 4.6.0 development 2020-09-11 14:07:58 -03:00
Ron Rennick 0d3889a360
Merge pull request #27113 from woocommerce/add/e2e-feedback-blockers
Incorporate blocking issues feedback on initial e2e environment package
2020-09-10 15:56:09 -03:00
Claudio Sanches d440f21a95
Merge pull request #27636 from woocommerce/fix/27220
Remove duplicated entry for Cyprus
2020-09-10 15:39:40 -03:00
Ron Rennick 1c07d5ec5a restore looking up tags from git, add npm install to travis e2e script 2020-09-10 14:54:35 -03:00
jonathansadowski 2bcdbacc98
Merge pull request #27625 from woocommerce/revert-improved-filtering-for-variations
Revert improved filtering for variations
2020-09-10 12:42:15 -05:00
Ron Rennick bff1e799f4 use better test for creating ready page 2020-09-10 13:23:18 -03:00
Christopher Allford 226225e0da
Merge pull request #27633 from woocommerce/fix/27618
Allow zero as variation attribute option
2020-09-10 09:05:56 -07:00
Ron Rennick 88139f9603 update travis setup for e2e 2020-09-10 11:14:51 -03:00
Nestor Soriano 4411a394dc Reintroduce adjust_posts_count, and remove unnecessary comment.
We can't remove that method since it's public, but its body has
been changed so that it just returns the input unchanged.
2020-09-10 15:17:43 +02:00
Christopher Allford 14c46fa4c2 Merge branch 'master' into add/e2e-feedback-blockers 2020-09-09 14:47:51 -07:00
Christopher Allford d0e6110e93 Fixed a failing E2E test 2020-09-09 14:47:44 -07:00
Christopher Allford aabc8ccd6b Updated all of the package-lock files using Node v10 2020-09-09 14:47:35 -07:00
Rodrigo Primo 84f0b87ebc Remove duplicated entry for Cyprus
Cyprus was listed both in Europe and Asia in the list of continents. This meant that when users search for it, for example when creating a new shipping zone, it would be displayed twice.

This commit fixes this problem by removing Cyprus from Europe and leaving it in Asia. CLDR puts Cyprus in Western Asia (2dd06669d8/tools/java/org/unicode/cldr/util/data/UnMacroRegions.txt (L229)).

I checked and there are no other cases of countries added to more than one continent in i18n/continents.php.
2020-09-09 17:10:51 -03:00
Ron Rennick 25cbfd2452 run grunt directly in travis e2e 2020-09-09 17:00:06 -03:00
Christopher Allford ae697f9fe2 Prevented zero from being considered empty when validating posted variation attributes 2020-09-09 11:29:31 -07:00
Ron Rennick a9c17d580b update webpack to latest 2020-09-09 13:18:00 -03:00
jonathansadowski d019e33c7e
Merge pull request #27630 from woocommerce/update/readme-changelog-version-numbers-for-4.5.1
Update changelog, readme, and version numbers for 4.5.1
2020-09-09 10:46:10 -05:00
Nestor Soriano 70a1cb2f1f Revert improved filtering for variations.
This commit reverts the functionality introduced in PR #26260
(later refined by #27175, #27190, #27508) in which filtering by
attribute using the layered nav widget was improved to handle the
cases of variations out of stock. The revert is a response to the
numerous problems reported by users in Woo 4.4 and 4.5

Not all the code has been reverted, only the code that resulted in
visible functionality changes. Thus, the code that generates
term relationships for variations is still in place to keep database
consistency and to keep the reverting changes to the minimum needed.
2020-09-09 17:36:26 +02:00
Jonathan Sadowski 9da304e983 Update version in class-woocommerce.php 2020-09-09 10:35:05 -05:00
Jonathan Sadowski 610d609d10 Remove extra linebreak 2020-09-09 10:33:26 -05:00
Jonathan Sadowski 7698f73ee9 Update version in package.json 2020-09-09 10:32:33 -05:00
Jonathan Sadowski ed14f8abfd Add changelog 4.5.0 back to readme.txt 2020-09-09 10:32:09 -05:00
Jonathan Sadowski 3dd8c84633 Update changelog, readme, and version numbers for 4.5.1 2020-09-09 09:53:26 -05:00
jonathansadowski d00083f1ec
Merge pull request #27628 from woocommerce/fix/27624
Check for state and postcode fields only if required
2020-09-09 09:41:57 -05:00
vedanshujain 6a2ea0e27a Add unit test for show_shipping for different countries. 2020-09-09 19:53:21 +05:30
Ron Rennick 21e099d48f merge master 2020-09-09 11:17:20 -03:00