Commit Graph

15159 Commits

Author SHA1 Message Date
Mike Jolley e380c14716 Upgrade handling 2016-03-02 18:32:33 +00:00
Mike Jolley b86e16cef4 Merge pull request #10455 from johnjamesjacoby/master
[2.5] Update database keys for utf8mb4 charset/collation
2016-03-02 18:28:22 +00:00
Justin Shreve f4d771ef3e Show error if copying can't even happen (to cover safari). 2016-03-02 10:25:16 -08:00
Mike Jolley b221f9964a Merge branch 'master' into 4-4-term-meta-handling 2016-03-02 18:24:52 +00:00
Mike Jolley 5c3e7ded03 Version checks not needed 2016-03-02 18:24:49 +00:00
Justin Shreve 32eabbc685 Provide a fallback message if copying to the clipboard fails. 2016-03-02 10:13:17 -08:00
Justin Shreve 4ef68a354a Have wp_insert_post return WP_Error when creating our coupon, so the is_wp_error check can catch it. 2016-03-02 06:54:33 -08:00
John James Jacoby ca8ffcc9f4 Update database keys for utf8mb4 charset/collation
Since WordPress 4.2, `utf8mb4` is a natively supported and encouraged type of installation. Unfortunately some WooCommerce database tables fail to get created in these types of installations (with something like the below settings):

```
define( 'DB_CHARSET', 'utf8mb4'            );
define( 'DB_COLLATE', 'utf8mb4_unicode_ci' );
```

This commit takes a queue from WordPress core's `schema.php` and limits the length of index `KEY`s to `191`.
2016-03-01 19:28:04 -06:00
Justin Shreve e94a60d4c3 Update minified JS 2016-03-01 11:49:43 -08: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 a2aa20bcb5 Rename payment-gateway JS to tokenization-form. 2016-03-01 11:49:42 -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 fa5283d3df Minify Simplify JS 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 cfe1da13d5 Remove todo comment for payment token tables 2016-03-01 11:49:41 -08:00
Justin Shreve 31bae0c19e Hook up the tokenization API to the "add payment method" button in my account settings. 2016-03-01 11:49:41 -08:00
Justin Shreve 9db1f65196 Hook up the payment token API to the my account > payment methods tab 2016-03-01 11:49:41 -08:00
Justin Shreve 2e73486004 Add minified simplify js.
Enable payment gateways to show/force CVC on saved gateways.
2016-03-01 11:49:41 -08:00
Justin Shreve 898242c34d Integrate simplify with the token API to save cards/customer data and use a saved card. 2016-03-01 11:49:40 -08:00
Justin Shreve eff4e297f9 First pass at showing saved payment methods on checkout 2016-03-01 11:49:40 -08:00
Justin Shreve defff6c5a9 Add the payment token tables to the database status report. 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 8f27a3b3af Full set of tests for the payment token API 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 2fdb2ed2a8 Don't inheirt from eCheck https://github.com/woothemes/woocommerce/pull/10260#discussion_r51901526 2016-03-01 11:49:38 -08:00
Justin Shreve 4b93f23ac5 Add filters when we return tokens for customers or orders. 2016-03-01 11:49:38 -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 72a4823f27 Pass the token object in the _deleted hook. 2016-03-01 11:49:38 -08:00
Justin Shreve da9368e8be Switch the payment token meta to use WP's metadata functions. 2016-03-01 11:49:38 -08:00
Justin Shreve 2e896ae24a Extend WC_Payment_Token_CC from WC_Payment_Token_eCheck since they both share eCheck's fields as a base. 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 9741ab0751 Swap method_exists for is_callable. 2016-03-01 11:49:38 -08:00
Justin Shreve f9b19234b0 Fix coding/WP standard for primary key definitions - there must be two spaces between the words PRIMARY key and the definition. 2016-03-01 11:49:37 -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
Claudio Sanches 29141af873 Merge branch 'master' of github.com:woothemes/woocommerce 2016-03-01 14:14:04 -03:00
Claudio Sanches 1560dc81d8 Changelog for 2.5.3 2016-03-01 14:13:51 -03:00
Claudio Sanches 27a9b72d36 Merge pull request #10447 from jonkoops/tax-form-field-classes
Add wrapper classes to product category form fields.
2016-03-01 14:02:46 -03:00
Horrower 875cd46f45 Hook for intercept deliver of webhooks
Let other plugins intercept deliver for some messages queue like rabbit/zeromq

https://github.com/woothemes/woocommerce/issues/10424#issuecomment-190806538
2016-03-01 19:58:27 +03:00
Claudio Sanches 3e955f6086 [2.5] Create new function to prevent endpoint indexing 2016-03-01 13:45:25 -03:00