Commit Graph

9220 Commits

Author SHA1 Message Date
Mike Jolley fb2804a5ab Code comments 2016-11-25 14:48:20 +00:00
Claudio Sanches 2e76eff151 Merge pull request #12466 from woocommerce/fix/webhook-resource-delete
[2.6] Fixed when should deliver wp_trash_post
2016-11-25 12:03:11 -02:00
Matty ff1442e9aa Allow cross sells to be sold as variations 2016-11-25 13:17:09 +00:00
Mike Jolley e3f19f85c6 Add readonly role field to API
Closes #12468 @claudiosanches
2016-11-25 13:04:21 +00:00
Mike Jolley 3610866bf9 Link variations to parent product page 2016-11-25 12:48:54 +00:00
Mike Jolley 52be22511c Inline docs for #12409 2016-11-25 12:24:26 +00:00
James Koster 7f15372919 declare support and add wrappers. #12038 2016-11-25 11:57:42 +00:00
Mike Jolley afe59f697d Merge pull request #12441 from opportus/layered-nav-menu-dropdown-empty-count-fix
Layered Nav menu dropdown empty count fix
2016-11-25 11:47:44 +00:00
Mike Jolley b620a8c8fb Move paypal CMD to end of post vars. 2016-11-25 11:41:49 +00:00
Mike Jolley eab41b37f7 Move location of billing email field to work with password managers.
Fixes #11016
2016-11-25 11:32:42 +00:00
Mike Jolley f67ffe4d89 Merge pull request #12465 from woocommerce/crud-ajax-class
AJAX Class and other fixes
2016-11-25 10:44:20 +00:00
Mike Jolley 1a632cda1f Missing space and incorrect comment 2016-11-25 10:43:56 +00:00
Mike Jolley 8d30e1d044 Correct title filter 2016-11-25 10:41:42 +00:00
Claudio Sanches 461e2486d2 [2.6] Fixed when should deliver wp_trash_post 2016-11-24 16:07:32 -02:00
Mike Jolley 9a1dd8d04b Menu order 2016-11-24 17:50:24 +00:00
Claudio Sanches 1ed2f9d136 Fixed undefined index while saving coupons on admin screen 2016-11-24 15:43:01 -02:00
Mike Jolley 1749551021 Customer crud 2016-11-24 15:31:05 +00:00
Mike Jolley 12a216595a CRUD ajax updates 2016-11-24 14:20:58 +00:00
Mike Jolley 9087a45f29 Remove attribute_ prefix rather than add so that get_attributes has better return values, and don't show duplicate data in cart. 2016-11-24 14:20:48 +00:00
Mike Jolley 6b8fc659bf Put get_title back in main class 2016-11-24 14:19:52 +00:00
Daniel Hüsken 89026327b8 Set customer role for user if it not a customer on the current blog 2016-11-24 13:52:54 +01:00
Mike Jolley ac62cffe16 Refactor ajax search for CRUD 2016-11-24 11:50:58 +00:00
Mike Jolley b1e538c096 Make factory check type 2016-11-24 11:50:46 +00:00
Mike Jolley b9bb8eabba Fix order item meta 2016-11-24 11:50:34 +00:00
Mike Jolley a0f08bb627 Merge pull request #12460 from davidlawson/master
Fixing incorrect prices around tax
2016-11-24 10:24:53 +00:00
Mike Jolley badd63bdd9 Merge pull request #12448 from woocommerce/webhook-api-versions
Allow send webhook payload using legacy API v3 or WP REST API integration
2016-11-24 10:22:01 +00:00
Mike Jolley f689635e4a Merge pull request #12449 from woocommerce/update/wc-ajax-crud
CRUD: Add CRUD operations for ajax functions.
2016-11-24 10:21:22 +00:00
David Lawson 1d955938f2 Fixing incorrect prices around tax
Missing `!` when moving code from `abstract-wc-product.php`. See https://github.com/woocommerce/woocommerce/blob/release/2.6/includes/abstracts/abstract-wc-product.php#L869-L919
2016-11-24 21:19:21 +11:00
Kevin Killingsworth 0b9c2e2f15 CRUD: Add CRUD operations for ajax functions.
This commit changes post and post_meta calls to CRUD objects
throughout the wc-ajax server-side code.

It does not update the most complex functions that have inline SQL.
2016-11-23 15:35:48 -06:00
Mike Jolley 13289b7104 Fix order item meta
@justinshreve Noticed this wasn’t saving or loading correctly. Is this
the only missing piece?
2016-11-23 18:44:24 +00:00
Mike Jolley 350ccd008c Correct autocomplete field
#11016
2016-11-23 18:43:38 +00:00
Mike Jolley b2b42600cd Merge pull request #12454 from woocommerce/deprecation-wrappers-12328
Deprecation wrappers
2016-11-23 17:42:45 +00:00
Mike Jolley 6dc6e43d08 Add replacement to log entry 2016-11-23 17:41:58 +00:00
Claudio Sanches bf598d538f Merge pull request #12453 from woocommerce/reports-12425
Reports 12425
2016-11-23 15:04:44 -02:00
Mike Jolley 4ca49ba999 Fix tests 2016-11-23 16:27:18 +00:00
Mike Jolley d7dfdd3d10 Wrap all deprecation calls. 2016-11-23 16:15:00 +00:00
Mike Jolley 87de7aab6f Remove unused variation CRUD methods. 2016-11-23 15:59:39 +00:00
Mike Jolley c8d1acb33e Prevent tags breaking page layout 2016-11-23 15:49:35 +00:00
Mike Jolley b1007c9d62 Fix order item meta saving 2016-11-23 15:37:34 +00:00
Mike Jolley d846ca6311 Update parent meta too for refunds 2016-11-23 15:37:34 +00:00
Mike Jolley 2b1c762142 Set parent 2016-11-23 15:37:34 +00:00
Mike Jolley f2ea71ea6f Reports fixes 2016-11-23 15:36:52 +00:00
Mike Jolley dcf39fc8cd Fix order item meta saving 2016-11-23 15:10:18 +00:00
Claudio Sanches bdb863cef1 Fixed method return value in write context 2016-11-23 12:41:40 -02:00
Mike Jolley 7ad640b567 Update parent meta too for refunds 2016-11-23 13:18:49 +00:00
Mike Jolley d5f1472e75 Set parent 2016-11-23 13:11:51 +00:00
Claudio Sanches 8d19832937 Fixed coding standards 2016-11-22 23:47:13 -02:00
Claudio Sanches 92ad1b43b2 Updated webhook admin options 2016-11-22 23:08:22 -02:00
Claudio Sanches 5a0c815623 Allow set data using legacy API v3 and WP API integration in webhooks 2016-11-22 22:59:55 -02:00
Claudio Sanches 5d1c074998 Fixed headers response data 2016-11-22 22:48:31 -02:00
Claudio Sanches a98c4b429f Fixed broke webhooks pagination label 2016-11-22 22:48:00 -02:00
Claudio Sanches 7aafd6cce7 Set webhook API version in REST API 2016-11-22 22:01:16 -02:00
Claudio Sanches 4d85905c0b Allow set webhook api version on admin 2016-11-22 21:58:36 -02:00
Claudio Sanches 30f1d0bf66 Allow set api version 2016-11-22 21:49:04 -02:00
Justin Shreve 90e93e1eba Set a blank default name when displaying the shipping zone form, so the placeholder will be used instead. 2016-11-22 10:52:58 -08:00
opportus 4c8e694dce Layered Nav menu dropdown empty count fix 2016-11-22 19:48:39 +01:00
Claudio Sanches 0f57fa0b50 Merge pull request #12436 from woocommerce/js-cookie-replacement
Replace jquery-cookie with js-cookie
2016-11-22 16:14:25 -02:00
Justin Shreve 2d5da279b6 Merge pull request #12435 from woocommerce/data-store-naming
Interface naming
2016-11-22 08:02:09 -08:00
Mike Jolley 3d8c6b8564 Merge pull request #12395 from opportus/layered-nav-hide-attributes
Layered nav widget with 'OR' behavior keep showing attributes applying to (0) products
2016-11-22 15:56:26 +00:00
Mike Jolley deec278d4a Only update menu order and display if set.
Closes #12411
2016-11-22 15:50:35 +00:00
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