vedanshujain
12f69c2d2d
Only set cache when neccessary.
...
This creates a tradeoff in optimizing repeated queries vs on off queries.
Another tradeoff is making more cache get calls as opposed to more SQL calls.
2020-11-10 14:23:43 +05:30
vedanshujain
a5fb3178f0
Drop CacheHydration class and do it directly.
...
Primary reason for dropping the cache hydration is that seems like we can acheive the same results without it, so no need to add this additional complexity to our code.
2020-11-10 14:23:43 +05:30
vedanshujain
975783b2b4
Also support methods in case direct accessing key is deprecated.
...
For example, in case of refunds, directly accessing parent_id is deprecated, we should use get_parent_id instead.
2020-11-10 14:23:42 +05:30
vedanshujain
8ab9fd26ef
Set key before trying to add values
2020-11-10 14:23:42 +05:30
vedanshujain
d502407145
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-11-10 14:23:42 +05:30
vedanshujain
1788de4cda
Add support for fetching collection
2020-11-10 14:23:41 +05:30
vedanshujain
44a226941d
Refactor `read_meta` into filter_raw_data for better re-usability.
2020-11-10 14:23:41 +05:30
vedanshujain
f80a67b05a
Removed unused file
2020-11-10 14:23:41 +05:30
vedanshujain
4f514e79ad
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-11-10 14:23:41 +05:30
vedanshujain
9bd92205b0
Add support to use `cache_hydration` in wc_get_order.
...
This can be used to pre-load expensive to compute caches.
2020-11-10 14:23:40 +05:30
vedanshujain
e9d97d97e7
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-11-10 14:23:40 +05:30
vedanshujain
22212c7065
Add support for fetching order using a hydration object.
...
It will ultimately be on the datastore to effectively use the hydration object.
2020-11-10 14:23:40 +05:30
vedanshujain
4efc22f7d5
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-11-10 14:23:39 +05:30
vedanshujain
f5d0275786
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-11-10 14:23:39 +05:30
vedanshujain
c0b173061e
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-11-10 14:23:39 +05:30
Christopher Allford
11c7e3bff6
Fixed issues that caused the factory creation to fail for SimpleProduct types
2020-11-09 12:02:01 -08:00
Ron Rennick
7282e0bca6
merge master
2020-11-09 14:30:01 -04:00
Ron Rennick
d69c143511
Merge branch 'master' into update/node-12
2020-11-09 13:58:18 -04:00
Ron Rennick
76d8b16659
remove old setup wizard test
2020-11-09 13:31:19 -04:00
Claudio Sanches
8db66f705f
Merge pull request #28216 from woocommerce/update/changelog-2
...
4.7 changelog
2020-11-09 12:13:55 -03:00
Claudio Sanches
229346e408
4.7 changelog
2020-11-09 12:12:01 -03:00
Gerhard Potgieter
692dfa7fec
Update banner copy
2020-11-09 15:21:38 +02:00
Gerhard Potgieter
8af8554770
Add functionality to handle woocommerce payments install
2020-11-09 14:48:49 +02:00
Gerhard Potgieter
7d33488d6b
WooCommerce Services to WooCommerce Shipping
2020-11-09 14:22:20 +02:00
Gerhard Potgieter
78336781d1
Remember output_ in function name
2020-11-09 14:20:24 +02:00
Gerhard Potgieter
b1d9363918
Add wc payments to extensions addons page.
2020-11-09 14:19:11 +02:00
Christopher Allford
d205d6551e
Added all of the update parameters for simple products
2020-11-06 14:01:03 -08:00
Christopher Allford
a646c712d8
Generalized the various restXXX functions
...
Since it looks like almost all of these are going to be virtually identical, it makes sense to have common functions that we can use instead of having to write all of the boilerplate unnecessarily.
2020-11-06 13:24:02 -08:00
Christopher Allford
29c9976354
Added "list", "read", "update", and "delete" actions for simple products
2020-11-06 11:11:58 -08:00
Christopher Allford
45b57d46b9
Added transformers for all of the product sub-data
2020-11-06 10:44:57 -08:00
Christopher Allford
b4a2316386
Added array support to property type and model transformer transformations
2020-11-06 10:01:12 -08:00
Renovate Bot
9c60fdd382
Update richardsimko/github-tag-action action to v1.0.5
2020-11-06 10:34:18 +00:00
Christopher Allford
5e35d68789
Added a new transformation for nesting transformers
2020-11-05 22:49:37 -08:00
Christopher Allford
fb5f393acb
Made abstract product sale dates easier to work with
2020-11-05 22:20:42 -08:00
Christopher Allford
681e568fbe
Expanded on a shared transformer to encapsulate abstract product transformations
2020-11-05 21:43:45 -08:00
Christopher Allford
7fcbc69235
Added a transformer to convert between data types
2020-11-05 19:25:45 -08:00
Christopher Allford
7287eb024c
Reversed the execution of transformers for "toModel" so that things like key changes will happen first
2020-11-05 16:29:04 -08:00
Christopher Allford
d060108afe
Added a custom transformation for models to implement specific logic.
2020-11-05 14:14:47 -08:00
Christopher Allford
4f08e102c4
Simplified the transformer usage in repositories
2020-11-05 13:57:56 -08:00
Rodrigo Primo
69d359c60c
Bump stable tag to 4.6.2
2020-11-05 18:57:35 -03:00
Rodrigo Primo
b192e31fc2
Add 4.6.2 changelog
2020-11-05 18:54:55 -03:00
Ron Rennick
9feecc1376
add/update e2e package changelogs
2020-11-05 16:57:04 -04:00
Christopher Allford
46df060c0e
Revised the ModelTransformer so that it can support more complicated transformations.
2020-11-05 12:37:40 -08:00
Nestor Soriano
5509e2185c
Add src/Internal/Vendor/League to source control.
2020-11-05 17:21:38 +01:00
Nestor Soriano
8bb0f196e6
Change the strategy for moving packages
...
Since the Mozart package requires PHP 7.2, and we need to support 7.0
and 7.1, the moving step has been removed from the composer install
stage. Instead, now it has to be triggered manually via
`composer run move-vendor-namespaces`, and the moved package must be
added to source control. See the updated src/Internal/Vendor/REAMDE.md
for details.
2020-11-05 17:19:14 +01:00
Christopher Allford
67f57abe26
Added type-safe transformation functions for converting between API representations and model representation
2020-11-04 16:33:34 -08:00
Christopher Allford
f438ddc80a
Added virtually all of the data returned by the REST API to the SimpleProduct model
...
There's still a few things missing but I think this is a much better start than where we were before.
2020-11-04 14:55:58 -08:00
Christopher Allford
e711a447fe
Fixed order account creation
2020-11-04 16:56:32 -03:00
Ron Rennick
d0fd8acd44
add permalinks working test
2020-11-04 14:56:48 -04:00
Christopher Allford
5f7454ae18
Merge pull request #28186 from woocommerce/packages/api/fix/pretty-permalinks-and-http-status
...
@woocommerce/api: Better support pretty permalinks
2020-11-04 10:52:59 -08:00