Commit Graph

61 Commits

Author SHA1 Message Date
Peter Fabian a6a26633a4 Removed extra check if the code is executed within admin. 2019-06-20 14:07:52 +02:00
Peter Fabian 91839ce078 Moved the JS enqueue from get_instance_form_fields to admin_footer action hook.
This should prevent multiple enqueues.
2019-05-20 12:56:01 +02:00
Rodrigo Primo 09c42033a0 Fix phpcs violations in includes/shipping/free-shipping/class-wc-shipping-free-shipping.php 2018-03-07 15:28:57 -03:00
Rodrigo Primo a4bdfddaa5 Fix phpcs violations in includes/shipping using phpcbf 2018-03-07 15:04:56 -03:00
Mike Jolley 01871fd2c8 Add getter for tax_display_cart variable, with filter 2017-12-15 13:39:35 +00:00
Mike Jolley 5c271af844 Handle isset for legacy props, and adjust free shipping logic
Closes #16547
2017-08-21 13:01:20 +01:00
Mike Jolley d2e3839d99 Use getters and setters in cart class 2017-08-18 12:51:45 +01:00
Beka Rice c54b0ecd9d Pass WC_Shipping_Method instance to availability filters 2017-08-11 16:36:18 -04:00
Rasmus 58eaa70424 Only print js for free shipping fields in admin
Since WC_Shipping_Method->get_option() runs $this->get_instance_form_fields it prints out the JS even when getting the option outsite admin.
2016-10-21 12:38:35 +02:00
Claudio Sanches 657c312cae Fix strings case (#12069)
* Fixed case for all _e, esc_attr_e and esc_html_e strings

* Fixed case for all _n_noop strings

* Fixed case for all _x strings

* Fixed case for all __, esc_html__ and esc_attr__ strings

* Fixed a few more strings

* Fixed strings in unit tests

* Fix PayPal Standard case.

* Save Order text
2016-10-12 11:16:30 +01:00
Mike Jolley cfa2ee3605 Round the totals
Closes #11803
2016-10-11 15:56:18 +01:00
Mike Jolley 1bc9da3e91 Merge branch 'master' into WC-CRUD
# Conflicts:
#	includes/class-wc-coupon.php
2016-08-04 12:10:04 +01:00
Claudio Sanches aa367efdf0 Fixed a typo 2016-07-19 09:37:42 -03:00
Claudio Sanches 70bf9bfcd6 Fixed show/hide free amount in modals 2016-07-19 09:33:56 -03:00
Claudio Sanches 19713f8bc7 Improved free shipping method and fixed missing filters 2016-07-19 09:05:25 -03:00
Mike Jolley 2cae613212 Remove discount when checking free shipping min amount.
Fixes #11232
2016-06-23 13:45:50 +01:00
Mike Jolley bc87f4a47e Fix - Javascript show/hide of option in free shipping method. 2016-06-21 10:47:21 +01:00
Mike Jolley 78142a8ebb Merge branch 'master' into WC-CRUD
# Conflicts:
#	includes/class-wc-checkout.php
#	includes/class-wc-coupon.php
#	includes/class-wc-customer.php
#	tests/unit-tests/cart/cart.php
#	tests/unit-tests/cart/functions.php
#	tests/unit-tests/coupon/coupon.php
#	woocommerce.php
2016-06-13 15:01:58 +01:00
Mike Jolley 3fd15ad50f Unused vars and code docs 2016-06-06 18:57:24 +01:00
Mike Jolley 2b1442c3f0 Added get_rate_id() method for consistent rate nams 2016-04-25 17:06:38 +01:00
Mike Jolley 412195905b Pass package in all add_rate calls 2016-04-20 15:03:10 +01:00
Mike Jolley a77735432b Use get_displayed_subtotal() to determine if conditions for coupons and free shipping is met.
@claudiosmweb

Closes #10711
2016-04-18 11:39:00 +01:00
Mike Jolley 8b53d1a618 Only load modal if supported 2016-03-24 18:31:39 +00:00
Justin Shreve 3eacb992bc Address issues from Mike's Feedback:
* Rename individual use, free shipping, and exclude sale items to match their meta names closer.
* Sanitize emails when using set_email_restrictions
* Remove some unnecessary explict true checks
* Move ID into _data with the rest of the fields
* Fixed some spacing issues
2016-03-17 09:19:27 -07:00
Justin Shreve d738dec05d Coupon CRUD (WIP). 2016-03-17 09:19:27 -07:00
Mike Jolley 1549158981 Add 'is_enabled' column to instances table and allow toggle in zones screen
@allendav
2016-03-15 17:23:06 +00:00
Mike Jolley fab8a871aa Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	includes/admin/class-wc-admin-assets.php
2016-02-10 14:12:39 +00:00
Mike Jolley a35c7d6aca Hide min order amount field when not needed
Closes #10129
2016-02-08 11:44:08 +00:00
Mike Jolley 8064b35350 Add methods from zones screen 2016-01-13 15:04:10 +00:00
Fredrik Forsmo 093684c7e0 * Added comments to `init`, `is_available` and `calculate_shipping`
* Added better properties comments.
* Fixed initialize typo
2016-01-06 20:10:54 +01:00
Mike Jolley 901db7b0f8 zone tweaks 2015-12-18 17:10:58 +00:00
Mike Jolley 9aa34330ac Fix sorting and saving for methods 2015-12-16 16:09:52 +00:00
Mike Jolley 1a77563085 started on free shipping 2015-12-16 13:52:46 +00:00
Mike Jolley a4f98902a3 Zone based free shipping 2015-12-15 16:23:46 +00:00
Mike Jolley a0e0bb1e55 Load instance methods for calculations 2015-12-15 15:00:45 +00:00
Mike Jolley 3b81642eec Instance and global level settings 2015-12-14 16:56:39 +00:00
Mike Jolley 63f8eebd6a Started on refactoring settings for instances 2015-12-11 16:41:38 +00:00
Mike Jolley 6cea054fca Method list screen and method screen with breadcrumbs 2015-12-11 14:11:12 +00:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley 92043a19f2 Free shipping should not be on by default
Closes #8819
2015-08-13 22:02:44 +01:00
Claudio Sanches 9e41552342 Removed all "@return void" 2015-07-16 16:55:48 -03:00
Mike Jolley 0e72c5e699 Class tidy 2015-05-15 14:16:44 +01:00
Mike Jolley 037242a9a2 More docblock tweaks 2015-02-03 16:03:28 +00:00
Claudio Sanches 9a6dc0bf41 Added select2 for all settings fields 2015-01-12 15:45:47 -02:00
Mike Jolley 50c6e1e4a0 select2 settings 2015-01-12 16:29:01 +00:00
claudiosmweb 8eeb6fc204 Removed more some unused code 2014-11-19 22:43:09 -02:00
shivapoudel 11a1be6b12 Absolute path and Indentation fix for includes/shipping/*.php :) 2014-09-21 01:29:32 +05:45
Mike Jolley ffa1db6ae6 Add $package to is_available shipping method hooks 2014-05-06 09:34:25 +01:00
Mike Jolley 51ba9c393f WC globals 2013-11-25 14:01:38 +00:00
Mike Jolley 3fd02a57d0 Locales - store standardised values, and display using locale in admin #3862 2013-11-12 17:43:30 +00:00