Commit Graph

679 Commits

Author SHA1 Message Date
Claudio Sanches 068b77cc43 Created WC_REST_Controller to allow batch create, update and delete items 2016-05-09 18:16:48 -03:00
Mike Jolley 167df8acce Tokens: Get cards on any screen 2016-05-09 17:36:40 +01:00
Mike Jolley fd001669fe woocommerce_email_order_items_args filter
Closes #10812
2016-05-03 15:40:34 +01:00
Mike Jolley f5e9875548 Allows stock status to be considered for availability and stock status on frontend.
Refactors code which make it so stock status was actually ignored if on
backorder. Fixes #10834

@claudiosmweb
2016-05-03 15:10:31 +01:00
Mike Jolley e53704431d Don't use abstract
Fixes #10815
2016-04-29 15:28:09 +01:00
Mike Jolley 2b1442c3f0 Added get_rate_id() method for consistent rate nams 2016-04-25 17:06:38 +01:00
Mike Jolley 87dc31ffac Force name to be set
Closes #10782
2016-04-25 13:25:15 +01:00
Mike Jolley 29c6acf767 Used positional placeholders in strings where the order of strings may require modification in the locale.
Closes #10775
2016-04-25 13:07:41 +01:00
Mike Jolley 87bc757de8 Correct $package usage and comments 2016-04-20 15:02:30 +01:00
Mike Jolley 04e9eef0ac Correct access props and comments 2016-04-20 15:02:19 +01:00
Diego Zanella e0c565da2d Backward compatibility with WC 2.5 and earlier
* Restored signature of WC_Shipping_Method::add_rate() method, while maintaining the features added in WC 2.6 to handle shipping zones.
2016-04-20 08:59:19 +01:00
Diego Zanella a506909822 Backward compatibility with WC 2.5 and earlier
* Slightly altered previous change to maintain the exact logic used before (i.e. the WC_Ajax class sets the POST data for the shipping method explicitly).
2016-04-20 08:49:32 +01:00
Diego Zanella ba46a5275f Backward compatibility with WC 2.5 and earlier
* Restored signature of WC_Settings_API::process_admin_options() method.
2016-04-20 08:48:29 +01:00
Claudio Sanches b6d33ee906 WP-API 2016-04-19 12:49:16 -03:00
Claudio Sanches 1021bfb754 Simplified the way how check terms permissions 2016-03-31 16:57:55 -03:00
Claudio Sanches 5091b36d41 Align variables 2016-03-31 16:34:16 -03:00
Claudio Sanches c890961f76 Fixed contexts on abstract terms controller 2016-03-31 16:17:39 -03:00
Claudio Sanches bf64942b28 Align variables 2016-03-31 16:14:18 -03:00
Claudio Sanches 8df7723895 Fixed permissions error messages 2016-03-31 16:03:59 -03:00
Claudio Sanches bb029747b7 Changed $namespace from public to protected in posts controller 2016-03-31 15:28:17 -03:00
Mike Jolley c757fd9940 Merge branch 'shipping-zone-modals'
# Conflicts:
#	assets/css/admin.css
#	assets/css/admin.scss
2016-03-31 15:20:06 +01:00
Claudio Sanches bb7e5ecfb6 Allow filter products by taxonomies and sku 2016-03-30 20:05:12 -03:00
Claudio Sanches 5d99b8b336 Register dp filter for orders and allow filter orders by customer id 2016-03-30 19:11:56 -03:00
Claudio Sanches f574a149d1 Attributes permissions 2016-03-30 14:49:22 -03:00
Claudio Sanches 82a6a5f18e Settings and reports permissions 2016-03-30 14:33:33 -03:00
Claudio Sanches 0fce9c5243 New product terms permissions 2016-03-30 14:17:40 -03:00
Claudio Sanches f4012b7f1f Reviewed post permissions 2016-03-30 11:17:16 -03:00
Mike Jolley 84d3fe2d82 wc_format_localized_decimal on dimensions 2016-03-30 13:19:01 +01:00
Mike Jolley 975f9d8c2d Remove nonce on cancel order URL
Nonces are invalid if the user ID changes during checkout e.g. through
registration. Cancel links are invalid.

cc @claudiosmweb

Fixes #10605
2016-03-30 12:45:25 +01:00
Claudio Sanches 5bf8c808fc Added methods to create and edit products 2016-03-29 21:22:10 -03:00
Mike Jolley 5f6aa6c160 Fix modals and ajax events 2016-03-24 19:06:51 +00:00
Mike Jolley 8b53d1a618 Only load modal if supported 2016-03-24 18:31:39 +00:00
Mike Jolley d3ac3f4073 Modals first pass 2016-03-24 17:26:40 +00:00
Mike Jolley dd68a57fff Merge pull request #10592 from woothemes/item-box-tweaks
Order Item Meta Box Tweaks
2016-03-23 15:03:24 +00:00
Joey Kudish bde619c4d6 Fix for older versions of php
Older versions of php cannot check `empty()` with a non-variable. Fixes
fatal introduced in 1d35fd6d73
2016-03-22 17:36:24 -07:00
Claudio Sanches 935a784061 Fixed header location when creating attribute terms 2016-03-22 15:34:27 -03:00
Mike Jolley f73149feaf Tweak variation display and reenable bulk editing 2016-03-22 17:13:39 +00:00
Mike Jolley 8d76396eaf Merge pull request #10588 from justinshreve/payment-tokens-wc-data
Convert WC_Payment_Tokens to use the new WC_Data
2016-03-22 14:14:29 +00:00
Justin Shreve 1d35fd6d73 Convert WC_Payment_Tokens (and CC/eCheck tokens) to use the new WC_Data and meta handling code. 2016-03-21 11:06:17 -07:00
Mike Jolley 7be2b129b6 Removed bulk actions from order items panel
Reduce/increase order item stock is less important these days do to
automatic stock reduction (when status changes) and because when you
refund items you can restock items via checkbox. Manual stock changes
can be performed by editing products.

Decreases complexity of order items box.
2016-03-21 14:58:14 +00:00
Justin Shreve 705213d4f5 Move meta_id into the _meta_data array instead of trying to use them as array keys.
This is so we can just use PHP's keys, instead of trying to add new meta and guess an avaible key.
2016-03-18 12:24:35 -07:00
Mike Jolley c25ef5e55a Adjust OR logic
#10568
2016-03-17 17:54:09 +00:00
Mike Jolley 12e23bb143 Adjust related query nesting
Fixes #10568
2016-03-17 16:02:33 +00:00
Mike Jolley 6765967be8 Add data and tostring handling to WC_Data 2016-03-17 15:22:29 +00:00
Justin Shreve a51e164fd7 Set versions to 2.6 2016-03-15 15:44:04 -07:00
Justin Shreve 9aff45e154 Feedback 2016-03-15 15:11:07 -07:00
Claudio Sanches f53e582566 Include prepare_links() to abstract posts controller 2016-03-15 16:55:41 -03:00
Claudio Sanches 218390071c Improve posts controller 2016-03-15 16:45:46 -03:00
Justin Shreve 5d6cdd05f1 Finish out tests, make sure to use cprrect meta ID field in order by clause. 2016-03-14 11:12:47 -07:00
Justin Shreve 97c0edf445 Start on tests for testing CRUD meta.
Includes Mock object for testing against the abstract WC_Data.
2016-03-14 11:12:47 -07:00
Justin Shreve f572a887e0 New Abstract WC_Data Class 2016-03-14 11:12:47 -07:00
Justin Shreve 5dbfc7ae16 Fix Payment Token 'set default' methods. Makes sure we are using the user ID of the payment token, and not the current user.
Also makes sure to properly unset other tokens when a new one is set as default. Finally, we make sure that a user is always set in our payment token tests (which was broken in some WP versions which alerted us to some broken tests).
2016-03-14 09:41:37 -07:00
Mike Jolley c573a5b75f Only add product line if product exists.
Fixes #10556
2016-03-14 15:40:58 +00:00
Mike Jolley 807b860a6c Merge pull request #10514 from SiR-DanieL/email-items-type
Added bool param for email order items hooks
2016-03-09 12:00:11 +00:00
Mike Jolley 55918626f5 [2.5] Update date for paid orders during non-manual updates only
Fixes #10510
2016-03-09 11:58:44 +00:00
Nicola Mustone c7756187e0 Added bool param for email order items hooks 2016-03-09 12:55:28 +01:00
Claudio Sanches 5f73c23da6 Better query params name 2016-03-09 01:46:04 -03:00
Claudio Sanches 396242b89c Fixed links for terms 2016-03-07 17:28:52 -03:00
Claudio Sanches 426410c2ae Manipule product attribute terms 2016-03-07 16:39:24 -03:00
Claudio Sanches 349b817d1e Fixed typo 2016-03-07 15:45:10 -03:00
Claudio Sanches 9f07be5271 Make easy to extend our rest controllers 2016-03-07 15:36:17 -03:00
Claudio Sanches b5e65c68b9 Added methods to update and create terms 2016-03-07 14:49:14 -03:00
Justin Shreve 927941e2ca Merge pull request #10260 from justinshreve/token-api
Payment Token API
2016-03-04 04:34:41 -08:00
Claudio Sanches d4d91d0fe9 Allow delete categories, tags and shipping classes 2016-03-03 18:19:02 -03:00
Mike Jolley e7e4808726 Correct status check and improved note
#10461
2016-03-03 17:04:20 +00:00
Mike Jolley fab1f224c6 When creating new order from draft, assume 'pending' for status transitions
Fixes #10461
2016-03-03 13:51:04 +00:00
Claudio Sanches 1f8e07108f Created methods to list and get terms 2016-03-02 20:22:12 -03:00
Claudio Sanches 0b0aa47421 Created methods to create and update customers 2016-03-02 19:14:03 -03:00
Claudio Sanches 8fe7935925 Fixed textdomains 2016-03-02 19:03:18 -03:00
Claudio Sanches c0affe96e0 Created API functions 2016-03-01 19:41:59 -03:00
Claudio Sanches 26c325acce Fixed __() functions 2016-03-01 17:53:25 -03:00
Justin Shreve ccb2c90ef3 Update references for the tokenization UI script (hiding/showing inputs) to use the correct file. 2016-03-01 11:49:43 -08:00
Justin Shreve 49c45c6dc1 Make sure the is_default/default token ability works correctly. Also adds a new method for getting a users default token. Fixes up some docblocks. 2016-03-01 11:49:42 -08:00
Justin Shreve 0985292a79 Make sure the tokenization script is output even if the current user is logged out (we still show save payment method if user is creating account). 2016-03-01 11:49:42 -08:00
Justin Shreve e3d7e206d0 Create a function for getting correctly formatted credit card type labels (MasterCard, American Express, etc) 2016-03-01 11:49:42 -08:00
Justin Shreve 75f2e6b85c Fix up some comments and add uninstalling code. 2016-03-01 11:49:42 -08:00
Justin Shreve c0b74296ff * Remove WC_Payment_Gateway_Form in favor of having a Payment_Gateway_CC and Payment_Gateway_eCheck
* Fix up some comments to match other comments in the WC code base
* Add some missing esc_* functions
* Add a gateway filter to get_customer_tokens + a test for it
2016-03-01 11:49:42 -08:00
Justin Shreve e6a527547f Add the ability for gateways to override the "new payment method" label. 2016-03-01 11:49:42 -08:00
Justin Shreve eff4e297f9 First pass at showing saved payment methods on checkout 2016-03-01 11:49:40 -08:00
Justin Shreve 5d8967c7d7 Prepare a list of payment methods for output on the payment methods "my account" page. 2016-03-01 11:49:40 -08:00
Justin Shreve 0061b36f3b Make sure WP knows about the payment token meta table, and return null in payment tokens get if a token cannot be found. 2016-03-01 11:49:39 -08:00
Justin Shreve df260c228d Prevent notice from being displayed for user_id and remove static on echeck validate 2016-03-01 11:49:39 -08:00
Justin Shreve 7b57b4c4cc Validate length for expiry - 4 chars for year and 2 for month. 2016-03-01 11:49:39 -08:00
Justin Shreve 214f077a91 Implement the rest of the WC_Data methods for creating, updating, reading, etc. 2016-03-01 11:49:39 -08:00
Justin Shreve c87c99f847 Start implementing the WC_Data interface. Move update, create, save, etc to the actual token class, and have the controller return our tokens. This matches the shipping zone API closer. 2016-03-01 11:49:39 -08:00
Justin Shreve f66b9e3681 Move meta (when creating) to its own sub meta array. 2016-03-01 11:49:39 -08:00
Justin Shreve f66a8b6478 Rename customer_id to user_id to match how orders reference the user. 2016-03-01 11:49:39 -08:00
Justin Shreve bfa9437a43 Rename the meta name _payment_tokens to remove the wc_ prefix, since this meta is a part of WC orders already. 2016-03-01 11:49:38 -08:00
Justin Shreve 6112752836 Misc cleanup based on PR feedback:
* Remove $token_id parameter from WC_Order's add_payment_token. get_id() can be used to access the ID
* Rename our list of token ids from meta to $token_ids as it makes more sense
* Cleaned up/fixed some of the comments in WC_Payment_Token
* Some code formatting fixes
2016-03-01 11:49:38 -08:00
Justin Shreve 204922e2ae Add methods for managing payment tokens associated with an order. 2016-03-01 11:49:37 -08:00
Justin Shreve c5aec06a8a First pass at a payment token API 2016-03-01 11:49:37 -08:00
Mike Jolley fa2280f3f8 Add notice on fail 2016-02-29 12:33:09 +00:00
Mike Jolley 09ef555e5a [2.5] Combine update post calls 2016-02-29 12:24:02 +00:00
Claudio Sanches 53db5ff4c8 Created coupons POST and PUT endpoints and coupons schema 2016-02-26 17:24:33 -03:00
Mike Jolley d7d609d85a Remove comment 2016-02-25 14:13:56 +00:00
Claudio Sanches f10846277b Added method to delete coupons 2016-02-23 15:28:43 -03:00
Claudio Sanches 0d88e3c380 Added endpoint to get coupons 2016-02-23 12:16:21 -03:00
Claudio Sanches a31ef08ed7 Improved permissions check 2016-02-22 17:48:38 -03:00
Claudio Sanches 43a5f6f842 Created abstract classes for posts and terms 2016-02-22 16:43:52 -03:00
Mike Jolley dbd6479f45 Comment on get_related limit
Closes #10398
2016-02-22 13:27:39 +00:00