Commit Graph

93 Commits

Author SHA1 Message Date
Claudio Sanches c4ccc38780 Fixed use __DIR__ for relative paths 2020-08-26 18:46:44 -03:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
vedanshujain 861b9de692 Send dummy parameters so that cost is evaluated correctly.
Also added a warning for subclasses that cost and qty are required keys.
2020-03-17 16:54:01 +05:30
TimBHowe e7a575222a Updated if statment to allow 0 values 2020-01-28 10:44:37 -05:00
Tim Howe 3b5e44ccf1 Added a call to the evaluate_cost function in the sanitize_cost function to throw an exception if there is an illegal character in the input. 2020-01-28 10:44:35 -05:00
Martin Snajdr 1c678372d4 Shipping cost filters removed & added two additional parameters get_option function filters 2019-02-20 15:59:40 +01:00
Martin Snajdr 89016f1e70 WP coding standards fix. 2019-02-20 11:57:03 +01:00
Martin Snajdr a6499d83ab Flat rate shipping cost / class cost filters added.
Allows to tweak flatrate shipping cost / class cost before it gets
calculated and applied to shipping. Very useful for multicurrency
plugins, because you can add field for fixed shipping cost in another
currency and use this value instead of the default value from cost
field.
2019-02-19 15:49:35 +01:00
JeroenSormani f4775ccd90 Use shipping method instead of property through magic + doc return statements 2019-01-04 12:41:38 +00:00
Rodrigo Primo a4bdfddaa5 Fix phpcs violations in includes/shipping using phpcbf 2018-03-07 15:04:56 -03:00
Mike Jolley a8957bd7a3 Strip currency 2018-01-22 14:13:08 +00:00
Mike Jolley 3ce51d9791 JSON context 2018-01-22 14:11:43 +00:00
Mike Jolley 96db283ae3 phpcs 2018-01-22 11:03:13 +00:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Justin Sternberg 6f5617eb2e Add the shortcode name param to the fee shortcode.
Re: #11447 and #12741
2017-01-03 13:05:43 -05:00
Mike Jolley 13086ba7cd no class cost logic should only kick in if store has shipping classes. 2016-12-20 15:40:05 +00: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
Aristeides Stathopoulos 9668247b95 WordPress.PHP.YodaConditions.NotYoda 2016-09-09 03:14:28 +03:00
Aristeides Stathopoulos ec8a0b288b PHPCS: WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast 2016-08-27 05:08:49 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Claudio Sanches 35c5a29cc2 Always remove commas while processing flat rate costs, closes #11346 2016-07-19 11:52:29 -03:00
Mike Jolley b682c0550e Allow max_fee in addition to min_fee in flat rate costs fields.
Closes #11151
2016-06-16 12:23:02 +01:00
Mike Jolley bbc13009f8 Share eval math class 2016-06-06 17:06:26 +01:00
Mike Jolley fbb73324d2 Simple local pickup cost
Closes #11045
2016-06-06 14:19:58 +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
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
Mike Jolley 8b53d1a618 Only load modal if supported 2016-03-24 18:31:39 +00:00
Mike Jolley f73149feaf Tweak variation display and reenable bulk editing 2016-03-22 17:13:39 +00: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 352184cc06 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	i18n/languages/woocommerce.pot
#	includes/abstracts/abstract-wc-payment-gateway.php
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/admin/settings/class-wc-settings-shipping.php
#	includes/wc-core-functions.php
#	uninstall.php
2016-02-05 14:58:48 +00:00
Diego Zanella 35d20f61a8 Added shipping class instance to woocommerce_evaluate_shipping_cost_args
The instance is going to be useful if any 3rd party needs to read any other property of the shipping class, which might not have been passed through the $args variable.
2016-01-13 13:35:24 +00:00
Mike Jolley 934269f1e8 woocommerce_evaluate_shipping_cost_args 2016-01-11 15:51:37 +00:00
Diego Zanella eb42c7b3e3 Added new woocommerce_evaluate_shipping_cost filter
* The filter will allow 3rd parties to pre-process the arguments used to evaluate a shipping cost formula.
2016-01-11 13:51:46 +00:00
Fredrik Forsmo efdd927e36 Improve docblock comments in WC_Shipping_Flat_Rate classes 2016-01-06 20:08:43 +01:00
Mike Jolley 119f19a5c1 Include and conditionally load legacy shipping methods 2015-12-18 14:24:34 +00:00
Mike Jolley 77f0e9d72a has settings handling 2015-12-18 13:12:20 +00:00
Mike Jolley 9aa34330ac Fix sorting and saving for methods 2015-12-16 16:09:52 +00:00
Mike Jolley 571469f44c Add methods to zones 2015-12-16 15:16:52 +00:00
Mike Jolley 1a77563085 started on free shipping 2015-12-16 13:52:46 +00:00
Mike Jolley 7fef09dd87 Fix notice in flat rate 2015-11-30 12:15:49 +00:00
Mike Jolley 77a54fdd68 Use ids for flat rate shipping class costs and handle bw compat
Closes #9715
2015-11-30 11:15:19 +00:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley f03be47e86 Handle non standard decimals in flat rate costs. 2015-08-24 15:26:08 +01:00
Mike Jolley 38d0d0dcad trim invalid chars from sum 2015-07-08 11:02:20 +01:00
Mike Jolley 85dcee63ae Flat rate shipping costs should ignore virtual items.
Closes #8506
2015-07-07 10:41:56 +01:00
Mike Jolley 583e1fc284 Typo closes #8381 2015-06-16 14:08:46 +01:00
Mike Jolley 71fc6c207e Free should only be used if costs set. If left blank, offer no rate
Closes #8380
2015-06-16 14:07:28 +01:00
Mike Jolley 2347418c5b International shipping + legacy updater 2015-06-16 11:37:58 +01:00
Mike Jolley b3a161a744 Fix upgrade logic for per item type 2015-06-15 15:32:51 +01:00