Commit Graph

36799 Commits

Author SHA1 Message Date
Gerhard Potgieter 0f62b77d6e Use right purple 2020-11-10 18:32:32 +02:00
Gerhard Potgieter a0812d5009 Remove redirect as it does not work with the background installer 2020-11-10 18:28:47 +02:00
Gerhard Potgieter b5fb7c0104 Add purple woo button 2020-11-10 18:26:59 +02:00
Tom Hopcraft 296d912151
[typo] - fix 2020-11-10 15:46:20 +00:00
Gerhard Potgieter b5a4a1597f Fix current section check, phpcs linting errors. 2020-11-10 16:48:11 +02:00
Roy Ho 4954c17e89
Merge pull request #28177 from davefx/patch-11
Optimizing memory usage
2020-11-10 06:13:03 -08:00
vedanshujain 6ed8ffe850 Addressed PR review comments #27734 2020-11-10 14:23:45 +05:30
vedanshujain 3dd80d6d65 Add polyfill for wp_cache_get_multiple 2020-11-10 14:23:44 +05:30
vedanshujain 0b29232fe3 Prime caches only when needed. 2020-11-10 14:23:44 +05:30
vedanshujain eeb8851717 Minor fixups for PR #27734 2020-11-10 14:23:44 +05:30
vedanshujain 4599884dd0 Fix failing tests. 2020-11-10 14:23:43 +05:30
vedanshujain bb1e2f44ae Removed/reverted more unnecessary changes. 2020-11-10 14:23:43 +05:30
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