Commit Graph

528 Commits

Author SHA1 Message Date
Peter Fabian 59c47c4407 Refactored line item logic
- prepare_line_items is not used as a test anymore, it only updates line items
- add_line_item is not used as a test anymore, only adds line items
- added method line_items_valid to test for valid line items
- shipping tax inclusion test moved to get_shipping_cost_line_item to encapsulate shipping tax-related logic
2018-03-28 11:04:34 +02:00
Peter Fabian f39e8e3900 Removed incorrect comment 2018-03-27 16:28:25 +02:00
Peter Fabian 5eda49f98a Line item logic refactored
Renamed function get_non_line_item_args
Documentation updates
...all part of code review fixes
2018-03-27 15:55:03 +02:00
Peter Fabian 88588eccbc Code duplication removed
Added test for non line item agrument presence
Fixed incorrect comment
2018-03-26 13:05:55 +02:00
Peter Fabian e19d64e51e Fixed PHPCS violations 2018-03-26 11:00:28 +02:00
Peter Fabian 26144afbc6 Test request length after applying filter
- added default value to get_line_item_args to not break interface
- smaller code review updates
2018-03-23 17:22:09 +01:00
Mike Jolley 0573232c62 Call empty cart when completing payment in PayPal 2018-03-23 12:54:03 +00:00
Peter Fabian 59af63e642 Merge branch 'master' into fix/19404 2018-03-23 09:36:15 +01:00
Peter Fabian 27a309d2df Removed line item limit and make sure the URL is shorter than 2083 characters
- removed limit to 9 line items per Paypal order
- if the request URL with all line items will be longer than 2083 characters, send it as one line item
- fix the character limit function to account for URL encoding happening in http_build_query
2018-03-22 15:39:30 +01:00
Claudio Sanches 0660a50e07 Removed obvious boolean results 2018-03-21 19:57:10 -03:00
Mike Jolley 291de9c1fb Override supports for PayPal to see if credentials exist 2018-03-13 11:35:20 +00:00
Claudio Sanches 54a0e01b8a
Merge branch 'master' into patch-2 2018-03-12 16:28:00 -03:00
Rodrigo Primo 4e3ba1b73b phpcs fixes in includes/gateways/paypal/includes/class-wc-gateway-paypal-response.php 2018-03-09 15:45:47 -03:00
Rodrigo Primo cf5ce33e29 phpcs fixes in includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php 2018-03-09 15:45:35 -03:00
Rodrigo Primo 128c4398a5 phpcs fixes in includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php 2018-03-09 15:45:22 -03:00
Rodrigo Primo 06af993595 phpcs fixes in includes/gateways/paypal/includes/class-wc-gateway-paypal-api-handler.php 2018-03-09 15:45:13 -03:00
Rodrigo Primo 93a50caa42 phpcs fixes in includes/gateways/paypal/class-wc-gateway-paypal.php 2018-03-09 15:45:00 -03:00
Rodrigo Primo cdf8b483a1 phpcs fixes in includes/gateways/cod/class-wc-gateway-cod.php 2018-03-09 15:44:48 -03:00
Rodrigo Primo 4989e0ff2b phpcs fixes in includes/gateways/class-wc-payment-gateway-echeck.php 2018-03-09 15:44:37 -03:00
Rodrigo Primo 609bc3bf71 phpcs fixes in includes/gateways/class-wc-payment-gateway-cc.php 2018-03-09 15:44:24 -03:00
Rodrigo Primo 3451dae895 phpcs fixes in includes/gateways/cheque/class-wc-gateway-cheque.php 2018-03-09 15:44:14 -03:00
Rodrigo Primo 701320ad32 phpcs fixes in includes/gateways/bacs/class-wc-gateway-bacs.php 2018-03-09 15:43:56 -03:00
Rodrigo Primo df249d3b76 Rename class WC_Payment_Gateway_eCheck to WC_Payment_Gateway_ECheck
To match WP coding standards.
2018-03-09 09:57:59 -03:00
Rodrigo Primo 8678ed8685 Fix phpcs violations using phpcbf 2018-03-09 09:53:10 -03:00
mweimerskirch 28df2ce3e0
Added a filter allowing to change the order status to the BACS gateway
The structure is the same as for the COD gateway (there, the filter is called "woocommerce_cod_process_payment_order_status").
2018-03-08 16:11:54 +01:00
Mike Jolley 85450f60ec Merge branch 'master' into pr/18596 2018-03-02 19:31:37 +00:00
danielshields e2da7fd277
Fix the PayPal API URL
Assuming they changed the section title, as the permalink is now "create" vs "creating"
2018-03-01 12:30:38 -05:00
Mike Jolley 341dfe1e7b Fix table styling in mobile 2018-01-30 13:24:59 +00:00
Mike Jolley 46f9e00497 Tweak paypal seller protection text
Closes #18632
2018-01-29 14:43:25 +00:00
Manos Psychogyiopoulos 690c7a9753 Check if paying for an existing order before looking at cart contents
Resolves a bug causing this logic to ignore the `order-pay` query var presence if the cart is populated with items.
2018-01-25 16:42:54 +02:00
Manos Psychogyiopoulos d10987d813 Match saved (canonical) rate IDs against chosen rates
Generates canonical rate IDs (`method_id:instance_id`) from package rates and order shipping line items.

Requires https://github.com/woocommerce/woocommerce/pull/18483
2018-01-25 16:40:31 +02:00
Manos Psychogyiopoulos d86a948f04 Add method instances in COD, grouped by method 2018-01-25 16:37:10 +02:00
Paul Dechov 54fa85f388 Disable all payment gateways by default
Switches defaults for Check payments and PayPal Standard to 'no', so that no payment gateways are enabled by default before running through setup wizard.
2018-01-19 02:23:55 -05:00
Mike Jolley 405c2614a8 Use new methods 2018-01-11 12:54:48 +00:00
Mike Jolley c7a3fd266c phpcs 2018-01-11 12:53:47 +00:00
James Allan f6eb02806b Mark orders as payment complete if the order total is 0
Similar to how other payment gateways like Stripe call
payment_complete on orders with $0 totals.
2017-11-30 13:31:10 +10:00
Mike Jolley 17710b864d Tweak IPN setting wording
@claudiulodro
2017-11-15 15:12:52 +00:00
George Lagonikas 6b7cc782d2
Removing obsolete code 2017-11-14 22:30:28 +00:00
George Lagonikas bca6bc7375
Text changes 2017-11-14 20:31:39 +00:00
George Lagonikas 87a75ce96e
Simplifying logic 2017-11-14 20:30:49 +00:00
SGroupGeorge 64332d82c7 Text changes 2017-11-14 17:51:46 +00:00
SGroupGeorge 3b2eec75d3 Adding checkbox to make IPN emails optional 2017-11-14 17:34:48 +00:00
Mike Jolley ced4551413 Merge branch 'pr/16986' 2017-10-27 15:49:00 +01:00
Mike Jolley 7cafc71526 Wording tweaks 2017-10-27 15:48:50 +01:00
Mike Jolley c15491b9ad Improved PDT handling and logs 2017-10-02 14:24:39 +01:00
SGroupGeorge 8a95d1111b Text changes 2017-09-29 10:47:07 +01:00
SGroupGeorge 38e6f07c70 Store both Live and Sandbox details for PayPal 2017-09-29 10:41:09 +01:00
Mike Jolley 9728cb5252 Added PayPal India support 2017-09-27 16:14:26 +01:00
Jaydeep Rami 46d3638089 Fix missing return statement (#16148)
* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement
2017-07-20 18:01:14 +01:00
Jaydeep Rami 3522857d23 Fix typo in WooCommerce plugin (#16135)
* Fixed typo

* Fixed more typo

* Fixed more typo

* Fix tyop

* Fix more typo

* Fix more typo

* Fix typo

* Fix typo

* Fix typo

* Fix typo datatime object

* Fix short name of compat

* Fix typo: update short name

* Fix typo "deactive" to "deactivate" and short BW - Compat

* Fix typo "Backwards compat"

* Fix typo 'parameters'

* Fix more typo 'pararmeters'

* Fix typo 'compund'

* FIx typo order

* Fix typo

* Fix typo 'incorrecly'

* Fix typo 'genarate'

* Fix typo 'reletive'

* Fix typo 'Handly'

* Fix typo 'rotatated'

* Fix typo

* Fix typo 'additonal'

* Fix typos
2017-07-17 11:10:52 +01:00
Mike Jolley 982edb2f9f Improves cash on delivery logic when dealing with multiple methods
If an order has multiple shipping methods, check all against the
allowed methods using a simple array_diff.
2017-07-13 16:21:59 +01:00
Beka Rice 1f95709e42 Fix deprecation notice from accessing order props directly 2017-07-13 09:56:46 -04:00
Claudio Sanches fa850ecfb4 Removed PayPal legacy code 2017-07-11 12:09:57 -03:00
Mike Jolley 59a4f3b0d9 Remove sandbox status forcing in PayPal gateway
Closes #15899

@californiakat Should we add
https://stackoverflow.com/questions/4298117/paypal-ipn-always-return-pay
ment-status-pending-on-sandbox to the docs when 3.2 launches?
2017-07-03 10:46:32 +01:00
Mike Jolley bf6c39fbf2 Use wc_float_to_string on item prices sent to paypal
Fixes #15872
2017-06-30 10:28:21 +01:00
Mike Jolley a1940f2da3 Grunt dev 2017-06-19 12:49:34 +01:00
Mike Jolley b8eafe985e Set defaults to avoid error if too few args passed 2017-06-15 15:43:32 +01:00
Mike Jolley 55e9add8e5 More strict COD method matching
Fixes #15606
2017-06-14 12:17:28 +01:00
Mike Jolley ba2bf67bb9 Use hash_equals where needed 2017-06-13 13:54:02 +01:00
Boro Sitnikovski 8a615a6e79 Update conditional for non-auth payments 2017-06-05 14:07:49 +02:00
Boro Sitnikovski 4b82a750fc Fix IPN authorization setting orders to completed automatically 2017-06-05 10:07:22 +02:00
Mike Jolley 20637e53b8 For COD orders, force payment complete status to be completed. 2017-05-24 18:48:34 +01:00
Mike Jolley c16acc6b51 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	assets/css/wc-setup-rtl.css
#	assets/css/wc-setup.css
2017-05-23 19:00:24 +01:00
Mike Jolley d3666738d8 Merge branch 'pr/15069' 2017-05-23 18:56:58 +01:00
Mike Jolley 00e5189a05 Merge pull request #15070 from rasmusbe/phpdoc-missing-return-throws
Phpdoc: Add missing return and throws
2017-05-23 18:50:58 +01:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Rasmus Bengtsson 4f00d7e5e3 PHPDoc: Add missing return statement 2017-05-15 13:37:59 +02:00
Mike Jolley bc4d36fd3f Add abspath checks
Closes #14999
2017-05-10 19:03:19 +01:00
Mike Jolley 891e55e1cf Merge pull request #14721 from woocommerce/fix/14670
Avoid escaped quote chars in strings
2017-04-27 15:34:27 +01:00
Mike Jolley aacb01d1e7 Merge branch 'pr/13503'
# Conflicts:
#	assets/css/twenty-seventeen.css
#	assets/css/woocommerce-layout.css
#	assets/css/woocommerce-layout.scss
#	assets/css/woocommerce.css
2017-04-27 12:46:05 +01:00
Mike Jolley 801f5e1eb1 Avoid escaped quote chars in strings
Closes #14670
2017-04-26 13:51:53 +01:00
Mike Jolley bcd39e9a79 Pass id not object to wc_reduce_stock_levels 2017-04-10 21:55:17 +01:00
Mike Jolley 8fa73602eb Correct calls to wc_reduce_stock_levels in PayPal and Simplify gateways
Fixes #14186
2017-04-10 11:56:52 +01:00
Akeda Bagus 0b416439c8
Fixed all typos of all files in includes/ directory.
Scanning and fixing were done automatically by codespell,
https://github.com/lucasdemarchi/codespell.
2017-03-29 00:58:51 +07:00
Mike Jolley 129293ab6f Remove array filter
No args should be null/not set since all args defined by WC have values.

Closes #13786
2017-03-28 11:49:27 +01:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Rami Yushuvaev d2457fe922 i18n: escape translation strings and fix wrong usage of i18n functions 2017-03-13 07:39:46 +02:00
Aristeides Stathopoulos 10ffc92a73 Inline control structures are not allowed 2017-03-07 22:24:24 +02:00
Mike Jolley 3df175fbc5 Hide bacs if empty 2017-02-28 12:46:31 +00:00
Claudio Sanches 61b39c206f Removed default instructions, closes #12853 2017-01-17 16:11:49 -02:00
Jon Surrell e4d5886427 Replace log `tag` with log `source` 2016-12-29 11:58:43 +01:00
Jon Surrell 03889f77cc Update use of deprecated wc_get_log_file_path 2016-12-29 11:58:43 +01:00
Jon Surrell aee5917440 Change wc_safe_dump to wc_print_r
Match print_r arguments, this makes usage obvious.
2016-12-29 11:58:43 +01:00
Jon Surrell 66b0620f7c remove print_r calls from paypal handler 2016-12-29 11:58:42 +01:00
Jon Surrell 96f9de2106 update paypal gateway logs 2016-12-29 11:58:42 +01:00
Jon Surrell 36201d38ec Update paypal gateway log method 2016-12-29 11:58:42 +01:00
Mike Jolley 56fef5b4f6 More styling settings tweaks 2016-12-21 11:36:48 +00:00
Mike Jolley 23c500986e Limit lengths of PayPal Args 2016-12-20 10:58:10 +00:00
Mike Jolley dcc47e395f Add email for case #12603
Closes #12603
2016-12-15 15:21:53 +00:00
Mike Jolley 36f7c3c810 woocommerce_paypal_line_item filter
Closes #12554
2016-12-09 16:59:29 +00:00
Mike Jolley edfc54dff5 Add image_url setting to PayPal Standard. 2016-12-08 12:28:05 +00:00
Mike Jolley b620a8c8fb Move paypal CMD to end of post vars. 2016-11-25 11:41:49 +00:00
Claudio Sanches 10f10d1644 [2.6] Ensure that PayPal always receive float amounts, closes #12291 (#12293) 2016-11-10 10:18:35 +00:00
Rami Yushuvaev 9469673c05 a11y: remove unneeded `title` attributes 2016-11-04 17:40:15 +02:00
Claudio Sanches 2de494e105 Merge pull request #12219 from ramiy/i18n-translation-comments
i18n: add translators comments
2016-11-03 13:24:35 -02:00
Mike Jolley 32e814eef1 Use all paid statuses in $customer->get_total_spent() 2016-11-03 11:27:03 +00:00
Rami Yushuvaev 8ab8bef52e add translators comments 2016-10-29 13:51:56 +03:00
Claudio Sanches fa0c710802 i18n <a> links, closes #12195 2016-10-27 15:36:24 -02:00
Rami Yushuvaev 140d0efb99 i18n: Avoid using HTML tags in translation strings (#12166)
* i18n: Remove some HTML tags from translation strings

* i18n: simpler translation string

* i18n: translations strings with surrounding `<strong>` HTML tags should be moved outside the translation string

* i18n: Avoide using `<code>' HTML tags in translation strings

* i18n: Split the notice to avoide using HTML tags in translation strings
2016-10-24 21:56:37 -02:00
Claudio Sanches 07ae13c51b Fixed coding standards recommended by WPCS 2016-10-13 16:51:18 -03:00