Commit Graph

9160 Commits

Author SHA1 Message Date
Mike Jolley bc1103b438 Missing key in download variation 2016-11-22 15:43:21 +00:00
Mike Jolley b73bbabab6 Fix missing key variable 2016-11-22 15:41:37 +00:00
Mike Jolley ca04ee8e9f Replace 2016-11-22 15:09:37 +00:00
Mike Jolley 430a31a963 Add notice class to checkout message
Closes #12245
2016-11-22 14:21:21 +00:00
Mike Jolley 277d9db832 Fix coupon unit test 2016-11-22 13:59:08 +00:00
Mike Jolley 885dad605a Interface naming 2016-11-22 13:54:51 +00:00
Justin Shreve 58b4cb9cf4 Make sure get_hook_prefix is present on all of our classes.
And fix up an exclude internal keys call for the customer data store.
2016-11-22 04:20:25 -08:00
Justin Shreve 0f335d7b60 Order item update store needs to extend the _WP class. 2016-11-22 04:07:46 -08:00
Justin Shreve dd0a2317f1 Fix up data tests and some coding standards issues 2016-11-22 04:05:05 -08:00
Justin Shreve 0814c2c579 Fix product variations 2016-11-22 04:05:05 -08:00
Justin Shreve 174aa38be6 Start moving meta to normal stores, instead of a separate meta store. 2016-11-22 04:05:05 -08:00
Justin Shreve a8fa6ea69e Move loading meta data store out of constructor. 2016-11-22 04:03:57 -08:00
Justin Shreve 5c59bad9ca Interface updates 2016-11-22 04:03:57 -08:00
Justin Shreve f3140889d5 Move meta handling saving/getting logic to a data store, and fix cache handling for meta to reduce queries. 2016-11-22 04:03:57 -08:00
Justin Shreve 8d551c01e6 Merge pull request #12403 from woocommerce/order-item-data-store
Order Item Data Store
2016-11-22 03:39:53 -08:00
Justin Shreve c83823b97c Remove stray error_log 2016-11-22 03:39:26 -08:00
Mike Jolley 1715fbdfd2 Merge pull request #12427 from woocommerce/fix-backwards-compatibility-for-product-title
Fix get_post_data() backwards compatibility for variations
2016-11-22 11:24:34 +00:00
Mike Jolley d87411285e Merge pull request #12429 from dabernathy89/master
fix typo in get_variation_sale_price argument list
2016-11-22 10:53:10 +00:00
Mike Jolley 3b9934a2b1 Try catch and false for products 2016-11-22 10:46:19 +00:00
Daniel Abernathy 4a758ef5ca fix typo in get_variation_sale_price argument list 2016-11-21 19:17:50 -06:00
Claudio Sanches 4f7290daa0 Fixed expected result from WC_Product::get_post_data for variations 2016-11-21 20:10:40 -02:00
Claudio Sanches 351f983e97 Stop use deprecated product->get_title() in coupons 2016-11-21 20:06:40 -02:00
Claudio Sanches dd78bbd6ad Keep backwards compatibility for variation title 2016-11-21 20:05:37 -02:00
Justin Shreve 84c24b99f8 Finish order item data store interface 2016-11-21 11:45:22 -08:00
Justin Shreve 9b08f4b32d Move order-item-functions queries to a data store. Rebase & update to use download data store. 2016-11-21 11:38:07 -08:00
Justin Shreve a7cb7e011c Only return a fallback system when we are in the view context, so we don't overwrite. 2016-11-21 10:57:33 -08:00
Justin Shreve afa294e70d Fix legacy API issues 2016-11-21 10:57:33 -08:00
Justin Shreve f15867bb67 Fix ajax actions for saving items, and misc issues. 2016-11-21 10:57:33 -08:00
Justin Shreve 34821b8c92 Add new files. 2016-11-21 10:57:33 -08:00
Justin Shreve 51a55b6782 Add interface, renaming main order item data store to abstract. Various fixes. 2016-11-21 10:57:33 -08:00
Justin Shreve b20b3590c8 First pass at order items 2016-11-21 10:56:21 -08:00
Claudio Sanches 89e628f3d5 Merge pull request #12421 from woocommerce/fix-12416
Make sure attributes get a prefix when set
2016-11-21 15:18:11 -02:00
Claudio Sanches ec56bd5015 Merge pull request #12386 from woocommerce/order-data-store
Order data stores
2016-11-21 15:14:22 -02:00
Mike Jolley 8cf3feaf82 No absint here 2016-11-21 16:55:36 +00:00
Mike Jolley 8466f4f79a Feedback 2016-11-21 16:46:32 +00:00
Mike Jolley a9b8d41500 Merge pull request #12407 from woocommerce/rest-api-crud-fixes
CRUD - Fixes and improviments for the REST API
2016-11-21 16:12:50 +00:00
Mike Jolley 32de28355a Merge branch 'master' into order-data-store
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-order-data.php
2016-11-21 14:45:46 +00:00
Mike Jolley edf973d35f Feedback 2016-11-21 14:30:56 +00:00
Mike Jolley 1fdfd02766 Use extra_data 2016-11-21 14:20:29 +00:00
Mike Jolley 4bbe1d39dc wc_get_object_terms should not return false.
Fixes that issue you mentioned on slack @justinshreve. cc
@claudiosanches
2016-11-21 14:16:57 +00:00
Mike Jolley a6a420bc40 make sure attributes get a prefix 2016-11-21 13:14:14 +00:00
Mike Jolley e36a85e5b1 Add to interface 2016-11-21 12:25:31 +00:00
Mike Jolley 73287b08a0 Move product query to store
Closes #12402
2016-11-21 12:25:00 +00:00
Mike Jolley c89f2396ae Fixes #12394 2016-11-21 12:16:15 +00:00
Mike Jolley ea80897195 This is no longer needed #12272 2016-11-21 12:01:04 +00:00
Mike Jolley 2bcd3b9166 Improved layered nav counts on attribute archives.
Closes #12272
2016-11-21 11:50:40 +00:00
flemarie 07752c33bf Update class-wc-countries.php
State is not exist for this country :

- French Guyanne : GF
- Reunion Island : RE
- Mayotte : YT
- Guadeloupe : GP
- Martinique : MQ

Thank you
2016-11-20 22:04:15 +04:00
Mike Jolley b929916190 get_cart_total comment 2016-11-18 21:19:52 +00:00
Mike Jolley c06c357399 Fix tests 2016-11-18 20:27:59 +00:00
Mike Jolley b81bde4f5a admin updates 2016-11-18 19:56:17 +00:00
Claudio Sanches 0806897fa8 Keep backwards compatibility while saving and displaying order custom addresses metadata on admin 2016-11-18 17:40:32 -02:00
Mike Jolley b1565cf0d6 Download update routine and interface 2016-11-18 19:29:37 +00:00
Claudio Sanches 2739243587 Use wc_get_coupon_id_by_code() while querying coupons by code 2016-11-18 17:12:01 -02:00
Claudio Sanches 40c90ac2d0 Use ID to query coupons 2016-11-18 17:10:41 -02:00
Claudio Sanches dd3a59d169 Return empty prices for deprecated cart_discount and order_discount in order legacy v1 2016-11-18 17:06:33 -02:00
Claudio Sanches fdb0cf499f Query coupons only by ID 2016-11-18 16:51:45 -02:00
Claudio Sanches 7a6bc5f9f5 Removed extra get_post() for orders 2016-11-18 16:46:59 -02:00
Claudio Sanches a8a5763b47 Removed extra ) 2016-11-18 16:39:31 -02:00
Claudio Sanches 073c924b98 Stop doing new queries only to get coupons gmt dates 2016-11-18 16:36:02 -02:00
Claudio Sanches 3074bd180f Apply GMT date for legacy v1 customers endpoint 2016-11-18 16:34:30 -02:00
Claudio Sanches 359e0a5a56 Use GMT dates in legacy API 2016-11-18 16:33:16 -02:00
Claudio Sanches 526a46325f Allow convert date to GMT in the legacy API 2016-11-18 16:13:46 -02:00
Mike Jolley 1b6d7acd24 Data store for downloads 2016-11-18 17:13:02 +00:00
Claudio Sanches 6d66391a68 Merge pull request #12388 from woocommerce/terms-performance
Optimize terms queries
2016-11-18 13:01:38 -02:00
Claudio Sanches 2a4aa26a31 Removed extra … 2016-11-18 12:19:44 -02:00
Claudio Sanches a27ac728f3 Fixed undefined post 2016-11-18 12:17:29 -02:00
Mike Jolley ac3be6ba50 Order stores complete 2016-11-18 14:07:21 +00:00
Mike Jolley da2cc7144c Merge pull request #12396 from woocommerce/update-customer-crud-endpoints
Apply Customer CRUD to legacy customer API endpoint
2016-11-18 12:35:24 +00:00
Mike Jolley d6c5a725ad Merge pull request #12397 from woocommerce/customer-crud-validation
Stop ignore the wc_create_new_customer() error messages
2016-11-18 12:34:08 +00:00
Claudio Sanches 7bf6fa0f11 Merge pull request #12391 from woocommerce/support-wp47-bulk-actions
Use new WP 4.7 bulk actions filters
2016-11-18 09:14:24 -02:00
Mike Jolley 5d9a9b4dec Fix tests 2016-11-18 11:14:09 +00:00
Claudio Sanches c0809d0b72 Fixed a typo and missing comma 2016-11-18 09:13:37 -02:00
Claudio Sanches ebf1fb55f3 Merge pull request #12392 from woocommerce/remove-legacy-code
Remove legacy dependency code
2016-11-18 09:12:30 -02:00
Mike Jolley 7e977f60e2 Feedback 2016-11-18 10:13:54 +00:00
Claudio Sanches 65c9a1b26b Fixed undefined method WC_Order_Item_Product::get_qty() 2016-11-18 06:08:00 -02:00
Claudio Sanches 714244faf0 Stop ignore the wc_create_new_customer() error messages
- Transform wc_create_new_customer() error message in exceptions
- Added new actions to match WC_Coupon_Data_Store_CPT and make easy to
  use in webhooks
2016-11-18 05:53:18 -02:00
Claudio Sanches 91d6c74701 Apply Customer CRUD methods to update and create legacy API endpoints 2016-11-18 04:16:38 -02:00
Claudio Sanches e032001953 Fixed undefined variable on update_customer_meta_fields() 2016-11-18 03:37:59 -02:00
Claudio Sanches 4fd47e1b02 Use wc_get_orders() to query customer orders 2016-11-17 22:11:05 -02:00
Claudio Sanches aba4699ee2 Removed old get avatar method 2016-11-17 22:01:55 -02:00
Claudio Sanches 14996ef97a Updated customer legacy API endpoints 2016-11-17 21:55:52 -02:00
opportus 42bb48abf1 layered nav OR hide attributes applying to 0 product 2016-11-17 23:33:24 +01:00
Claudio Sanches 375b6e9789 Remove legacy dependency code 2016-11-17 19:06:46 -02:00
Claudio Sanches 92c7cafff8 Use new WP 4.7 bulk actions filters, closes #12379 2016-11-17 18:57:48 -02:00
Claudio Sanches f5a228509a Fixed coding standards 2016-11-17 18:07:58 -02:00
Claudio Sanches e1aeba9f21 Remove all wp_get_post_terms() and wp_get_object_terms() terms occurrences 2016-11-17 17:02:05 -02:00
Claudio Sanches 4c54143743 Created new helpers to prevent use non-cached functions to query terms 2016-11-17 17:00:56 -02:00
Mike Jolley c933f82961 Refunds 2016-11-17 16:53:13 +00:00
Mike Jolley 792a92e166 Factory 2016-11-17 16:12:04 +00:00
Mike Jolley 8d6f236d47 Fix save 2016-11-17 16:02:09 +00:00
Mike Jolley 717f712b3d save addresses 2016-11-17 15:32:52 +00:00
Mike Jolley d88b512143 Setters 2016-11-17 15:17:23 +00:00
Mike Jolley 286cb2d1c8 get_address_prop for customers 2016-11-17 15:05:40 +00:00
Mike Jolley 87aadaa7cf getters 2016-11-17 15:02:33 +00:00
Mike Jolley 52c866c57b Main order interface 2016-11-17 14:37:29 +00:00
Mike Jolley 83813bb9bb Interface 2016-11-17 13:18:24 +00:00
James Koster 1039babe2c manual order creation - make address load/copy icons text links to improve usability. closes #12356 2016-11-17 12:38:15 +00:00
Mike Jolley eafd7c9fa5 Use data store for methods 2016-11-17 12:34:39 +00:00
Mike Jolley 81a2d6345f Setters 2016-11-17 11:26:24 +00:00
Mike Jolley b37db6eb7b Getters 2016-11-17 11:22:24 +00:00
Mike Jolley d387afbba3 Added data store 2016-11-17 10:53:22 +00:00
Justin Shreve 151f39d559 Merge pull request #12374 from woocommerce/update/quick-and-bulk-edit-crud
Product quick and bulk edit.
2016-11-16 14:19:58 -08:00
Justin Shreve 20fca44334 Handle product quick and bulk edit. 2016-11-16 12:54:53 -08:00
Claudio Sanches 4a20b2a8a1 Merge pull request #12371 from woocommerce/product-visible-by-default
Make products visible by default
2016-11-16 18:27:34 -02:00
Claudio Sanches 003728ff11 Merge pull request #12319 from woocommerce/allow-password-strength-lost-pass-page
[2.6] Allow password strength meter in "Lost Password" page
2016-11-16 17:15:00 -02:00
Claudio Sanches 240e58ea31 Merge pull request #12368 from woocommerce/exclude-webhoook_delivery-from-count-comments
[2.6] Exclude webhook_delivery from wp_count_comments()
2016-11-16 17:11:24 -02:00
Claudio Sanches c5a00a3120 Make products visible by default 2016-11-16 16:56:40 -02:00
Lee Willis 837007af83 Make docs for wc_get_products() match implementation 2016-11-16 13:24:01 -02:00
Mike Jolley 29ddaca8e8 Merge branch 'update/shipping-zone-data-store'
# Conflicts:
#	includes/api/class-wc-rest-products-controller.php
#	tests/unit-tests/product/data-store.php
2016-11-16 15:11:13 +00:00
Mike Jolley ecc503c2c7 Merge branch 'product-crud-test-fixes'
# Conflicts:
#	includes/class-wc-data-store.php
#	woocommerce.php
2016-11-16 15:09:32 +00:00
Claudio Sanches 3b4be48a1c [2.6] Exclude webhook_delivery from wp_count_comments(), closes #12344 2016-11-16 12:04:05 -02:00
Justin Shreve 85cfe59988 Fix product related tests after product CRUD merge 2016-11-16 05:18:03 -08:00
Justin Shreve a6155c2d7c Add zone_id to get_zones output for ajax. 2016-11-16 04:54:42 -08:00
Justin Shreve 421d0331b6 Make sure we don't try to ->read when creating a new shipping zone. 2016-11-16 04:54:42 -08:00
Justin Shreve 564098f26a Handle feedback 2016-11-16 04:54:42 -08:00
Justin Shreve 23a325ca8d Make sure we error out on read if a zone is not found. 2016-11-16 04:53:23 -08:00
Justin Shreve 6f51fce88b A few coding standards fixes 2016-11-16 04:53:23 -08:00
Justin Shreve 735c1b7a14 Finish moving queries to the shipping zone data store, update usage of deprecated get_zone_id, legacy updates. 2016-11-16 04:53:23 -08:00
Justin Shreve 61d1b29789 Shipping Zone Data Store 2016-11-16 04:53:23 -08:00
Mike Jolley 76b32c9aa5 WIP - Product CRUD (#12065)
* Created function to get the catalog visibility options

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* Hardcode the get_type per product class

* Initial look through getters and setters and abstract data

* Missing var

* Add related product functions and deprecate those in class.

* No need to exclude ID

* Fixed coding standards and improved the docblocks

* Get cached terms from wc_get_related_terms()

* Fixed wrong variable in wc_get_related_terms

* Use count() instead of sizeof()

* Sanitize ids later

* Remove unneeded comments

* wc_get_product_term_ids instead of related wording and use in other places.

get_the_terms is used here and also handles caching, something
wp_get_post_terms does not.

* Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.

* Bump template version

* Handle PR feedback: Remove duplicate regular_price update, allow changing of post status for products, remove deprecation for get_title since we might still offer it as a function

* Made abstract function useful

* External Product CRUD

* _virtual meta should be 'no', not taxable, in product unit test helper

* Grouped product class

* Tests

* Move children to meta and update test

* Use get_upsell_ids

* Spacing in query

* Moving and refactoring methods

* Availability html

* Tidy/add todos

* Rename method

* Put back review functions (still todo)

* missing $this

* get_price_including_tax/excluding_tax functions

* wc_get_price_to_display

* Price handling

* [Product CRUD] Variable (#12146)

* [Product CRUD] Variable Products

* Handle PR feedback.

* [Product CRUD] Grouped Handling (#12151)

* Handle grouped product saving

* Update routine

* [Product CRUD] Product crud terms (#12149)

* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function

* Product crud admin save routine (#12174)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function

* [Product CRUD] Product crud admin use getters (#12196)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Move settings into new files

* Refactor panels and use getters

* Use getters for variation panel

* Revert save variation changes for now

* Add todos

* Fix downloads

* REST API CRUD Updates

* Additional API updates/fixes. Added some todos

* Fix final failing tests and implementing setters/getters and attributes functionality.

* Fix comparison for is_on_sale and remove download_type from WC_Product.

* Add a wc_get_products wrapper.

* Remove the download type input from the product data metabox for downloadable products. (#12221)

* [Product CRUD] Variations - setters, getters and admin. (#12228)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* Feedback fixes

* Implement CRUD in the legacy REST API

* Handle PR feedback

* [Product CRUD] Getter setter proxy methods (#12236)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* get_prop implementation in abstract and data classes

* Implement set_prop

* Change handling

* Array key exists

* set_object_read

* Use get_the_terms() instead of wp_get_post_terms()

wp_get_post_terms() is a wrapper around wp_get_object_terms() which does not
use the object cache, and generates a database query every time it is used.

get_the_terms() however can use data from the object cache if present.

* Allow WP_Query to preload post data, and meta in wc_get_products()

Allow WP_Query to bulk query for post data and meta if more than
just IDs are requested from wc_get_products(). Reduces query count
significantly.

* [Product CRUD] Variable, variation, notices, and stock handling (#12277)

* No longer needed

* Remove old todos

* Use getters in admin list

* Related and upsells update for CRUD

* Fix notice in gallery

* Variable fixes and todos

* Context

* Price sync

* Revert variation attributes change

* Return parent data in view context

* Defer term counting

* wc_find_matching_product_variation

* Stock manage tweaks

* Stock fixes

* Correct id

* correct id

* Better sync

* Data logic setter fix

* feedback

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* Hardcode the get_type per product class

* Initial look through getters and setters and abstract data

* Missing var

* Fixed coding standards and improved the docblocks

* Get cached terms from wc_get_related_terms()

* Fixed wrong variable in wc_get_related_terms

* Use count() instead of sizeof()

* Add related product functions and deprecate those in class.

* No need to exclude ID

* Sanitize ids later

* Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.

* Remove unneeded comments

* wc_get_product_term_ids instead of related wording and use in other places.

get_the_terms is used here and also handles caching, something
wp_get_post_terms does not.

* Handle PR feedback: Remove duplicate regular_price update, allow changing of post status for products, remove deprecation for get_title since we might still offer it as a function

* External Product CRUD

* _virtual meta should be 'no', not taxable, in product unit test helper

* Bump template version

* Made abstract function useful

* Grouped product class

* Tests

* Move children to meta and update test

* Use get_upsell_ids

* Spacing in query

* Moving and refactoring methods

* Availability html

* Tidy/add todos

* Rename method

* Put back review functions (still todo)

* missing $this

* get_price_including_tax/excluding_tax functions

* wc_get_price_to_display

* Price handling

* [Product CRUD] Variable (#12146)

* [Product CRUD] Variable Products

* Handle PR feedback.

* [Product CRUD] Grouped Handling (#12151)

* Handle grouped product saving

* Update routine

* [Product CRUD] Product crud terms (#12149)

* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function

* Product crud admin save routine (#12174)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function

* [Product CRUD] Product crud admin use getters (#12196)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Move settings into new files

* Refactor panels and use getters

* Use getters for variation panel

* Revert save variation changes for now

* Add todos

* Fix downloads

* REST API CRUD Updates

* Additional API updates/fixes. Added some todos

* Fix final failing tests and implementing setters/getters and attributes functionality.

* Fix comparison for is_on_sale and remove download_type from WC_Product.

* Add a wc_get_products wrapper.

* Remove the download type input from the product data metabox for downloadable products. (#12221)

* [Product CRUD] Variations - setters, getters and admin. (#12228)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* Feedback fixes

* Implement CRUD in the legacy REST API

* Handle PR feedback

* [Product CRUD] Getter setter proxy methods (#12236)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* get_prop implementation in abstract and data classes

* Implement set_prop

* Change handling

* Array key exists

* set_object_read

* Use get_the_terms() instead of wp_get_post_terms()

wp_get_post_terms() is a wrapper around wp_get_object_terms() which does not
use the object cache, and generates a database query every time it is used.

get_the_terms() however can use data from the object cache if present.

* [Product CRUD] Variable, variation, notices, and stock handling (#12277)

* No longer needed

* Remove old todos

* Use getters in admin list

* Related and upsells update for CRUD

* Fix notice in gallery

* Variable fixes and todos

* Context

* Price sync

* Revert variation attributes change

* Return parent data in view context

* Defer term counting

* wc_find_matching_product_variation

* Stock manage tweaks

* Stock fixes

* Correct id

* correct id

* Better sync

* Data logic setter fix

* feedback

* Prevent notices

* Handle image_id from parent

* Fix error

* Remove _wc_save_product_price

* Remove todo

* Fixed wrong variation URLs

* Fixed undefined $image_id in WC_Product_Variation::get_image_id()

* Allow wc_rest_prepare_date_response() handle timestamps

* Updated get methods on REST API for variations

* Use variations CRUD to save variations metadata

* [Product CRUD] Abstract todos (#12305)

* Get dimensions and weights, with soft deprecation

* Product attributes

* Ratings

* Fix read method

* Downloads

* Feedback

* Revert "[Product CRUD] Abstract todos (#12305)"

This reverts commit 9a6136fcf8.

* Remove deprecated get_variation_id()

* New default attributes method

* [Product CRUD] Product Datastore (#12317)

* Fix up tests in the product/* folder.

* Handle data store updates for grouped, variable, external, simple, and general data store updates for products.

* Variations & variable changes.

* Update -functions.php calls to use data store.

* Add an interface for the public product data store methods.

* Finished product factory tests

* Correctly delete in the api, fix up some comments, and implement an interface for the public variable methods.

* Fix up delete in all versions of the api

* Handle feedback

* Match protected decloration to parent

* Product crud abstract todos (#12316)

* Get dimensions and weights, with soft deprecation

* Product attributes

* Ratings

* Fix read method

* Downloads

* Feedback

* Fix up store

* Fixed method returning in write context

* Fix error in variation admin

* Check for parent value - fixes tax class

* Remove old/complete todos

* Allow set tax class as "parent"

* Removed duplicated sync

* Fixed wrong variation URLs

* Fixed undefined $image_id in WC_Product_Variation::get_image_id()

* Allow wc_rest_prepare_date_response() handle timestamps

* Updated get methods on REST API for variations

* Use variations CRUD to save variations metadata

* Remove deprecated get_variation_id()

* New default attributes method

* Fixed method returning in write context

* Allow set tax class as "parent"

* Removed duplicated sync

* Fixed coding standards

* TODO is not accurate.

* Should pass WC_Product instancies to WC_Comments methods (#12327)

* Use new method in abstract order class to prevent headers sent issue in tests

* Fixed variable description in REST API

* Updated how create initial product variation

* Fixed a few fatal errors and warnings in Products CRUD (#12329)

* Fixed a few fatal errors and warnings in Products CRUD

* Fixed sync functions

* Add variations CRUD to legacy API (#12331)

* Apply crud to variable products in legacy API v1

* New REST API do not need fallback for default attributes

* Apply variations CRUD to legacy API v2

* Legacy v2 - save default attributes

* Variations in legacy API v2 do not have descriptions

* Fixed legacy API v2 variations params

* Applied variations CRUD to legacy API v3

* Sync before save in legacy apis

* Punc

* Removed API todos

* Removed test

* Products endpoint tweaks (#12354)

* Var type already normalized on CRUD

* Let Product CRUD handle with validation, sanitization and conditional checks

* Set downloads using WC_Product_Download

* Stop try catch exceptions more than one time

* Handle WC_Data_Exception in legacy API

* Complete remove products when fails on creating

* On creating I mean!

* Already have a method to complete delete products

* Fixed standards using WP CodeSniffer

* get_the_terms() returns false when empty

* get_manage_stock returns boolean

@claudiosanches

* Merge conflict

* Variations API endpoint fixes

* Product CRUD improvements (#12359)

* args is not used any more - remove todo

* Added test for attributes

* wc_get_price_excluding_tax usage

* parent usage

* Fix rating counts

* Test fixes

* Cleanup after tests

* Make sure status transition code runs even during API calls, not just in admin.

* Default visibility

* Fix attribute setting in API

* Use get name instead of get title

* variation id usage

* Improved cross sell templates

* variation_data

* Grouped product sync

* Notices

* Sync is not needed in API

* Delete

* Rename interfaces

* Update counts in data store
2016-11-16 12:38:24 +00:00
Mike Jolley af3496402d Merge branch 'master' into product-crud
# Conflicts:
#	includes/class-wc-data-store.php
#	woocommerce.php
2016-11-16 12:37:57 +00:00
Mike Jolley 599a2ad296 Product CRUD improvements (#12359)
* args is not used any more - remove todo

* Added test for attributes

* wc_get_price_excluding_tax usage

* parent usage

* Fix rating counts

* Test fixes

* Cleanup after tests

* Make sure status transition code runs even during API calls, not just in admin.

* Default visibility

* Fix attribute setting in API

* Use get name instead of get title

* variation id usage

* Improved cross sell templates

* variation_data

* Grouped product sync

* Notices

* Sync is not needed in API

* Delete

* Rename interfaces

* Update counts in data store
2016-11-16 12:17:00 +00:00
Justin Shreve e83ec0c235 Call apply_changes when updating and creating a coupon. 2016-11-15 15:25:36 -08:00
Justin Shreve 53524141b7 Fix up the other delete signatures. 2016-11-15 11:35:10 -08:00
Mike Jolley eade55041c Delete args 2016-11-15 18:11:25 +00:00
Mike Jolley d8fcfcefb8 Variations API endpoint fixes 2016-11-15 12:51:26 +00:00
Mike Jolley ef990355fd Merge conflict 2016-11-15 11:52:29 +00:00
Mike Jolley c18f6efeb4 Conflicts from master 2016-11-15 11:52:05 +00:00
Claudio Sanches b1c32e5e50 Products endpoint tweaks (#12354)
* Var type already normalized on CRUD

* Let Product CRUD handle with validation, sanitization and conditional checks

* Set downloads using WC_Product_Download

* Stop try catch exceptions more than one time

* Handle WC_Data_Exception in legacy API

* Complete remove products when fails on creating

* On creating I mean!

* Already have a method to complete delete products

* Fixed standards using WP CodeSniffer

* get_the_terms() returns false when empty

* get_manage_stock returns boolean

@claudiosanches
2016-11-15 10:26:42 +00:00
Mike Jolley dc60ea4c23 Merge branch 'master' into customer-data-store
# Conflicts:
#	includes/class-wc-data-store.php
#	woocommerce.php
2016-11-14 18:21:30 +00:00
Mike Jolley cce4eef99d Payment Token Data Store (#12348)
* Payment Token Data Store

* Handle feedback

* Rename interface file
2016-11-14 18:20:00 +00:00
Mike Jolley 00ed627b29 Data stores 2016-11-14 18:18:08 +00:00
Claudio Sanches 8650365e32 Removed test 2016-11-14 15:19:28 -02:00
Justin Shreve d986d1bba1 Rename interface file 2016-11-14 09:13:55 -08:00
Justin Shreve 944e5d658b Handle feedback 2016-11-14 09:08:46 -08:00
Claudio Sanches 657bd226f8 Removed API todos 2016-11-14 14:43:30 -02:00
Claudio Sanches 60f1fcf9e3 Merge pull request #12334 from sabbir1991/master
Fix toggle download and virtual in variation bulk action #12333
2016-11-14 14:11:30 -02:00
Justin Shreve 370166a6b0 Payment Token Data Store 2016-11-14 06:20:41 -08:00
Justin Shreve b0f859f6a2 Merge pull request #12345 from woocommerce/remove/cli
Remove CLI
2016-11-14 03:44:02 -08:00
Justin Shreve ad67277a9b Blank file for wc-cli.php 2016-11-14 03:36:26 -08:00
Claudio Sanches 4827225454 Add variations CRUD to legacy API (#12331)
* Apply crud to variable products in legacy API v1

* New REST API do not need fallback for default attributes

* Apply variations CRUD to legacy API v2

* Legacy v2 - save default attributes

* Variations in legacy API v2 do not have descriptions

* Fixed legacy API v2 variations params

* Applied variations CRUD to legacy API v3

* Sync before save in legacy apis

* Punc
2016-11-14 11:31:52 +00:00
Claudio Sanches 6de7984f2d Fixed a few fatal errors and warnings in Products CRUD (#12329)
* Fixed a few fatal errors and warnings in Products CRUD

* Fixed sync functions
2016-11-14 11:02:56 +00:00
Justin Shreve 365a834d92 Remove CLI from WooCommerce. Moving to a new package. 2016-11-14 02:42:40 -08:00
Justin Shreve 4b33f11bf2 Move queries from coupon-functions.php to the coupon data store. 2016-11-14 02:31:04 -08:00
Sabbir Ahmed 7cd5488f26 Fix toggle download and virtual in variation bulk action #12333 2016-11-13 11:45:12 +06:00
Claudio Sanches 83f74145ee Updated how create initial product variation 2016-11-11 17:29:56 -02:00
Claudio Sanches 1f31de39d9 Fixed variable description in REST API 2016-11-11 16:36:58 -02:00
Mike Jolley c4806e63d1 Use new method in abstract order class to prevent headers sent issue in tests 2016-11-11 18:30:18 +00:00
Claudio Sanches 096622c9e4 Should pass WC_Product instancies to WC_Comments methods (#12327) 2016-11-11 18:13:56 +00:00
Mike Jolley bc9d2c72aa TODO is not accurate. 2016-11-11 18:09:06 +00:00