Commit Graph

73 Commits

Author SHA1 Message Date
Mike Jolley d7dfdd3d10 Wrap all deprecation calls. 2016-11-23 16:15:00 +00:00
Krzysztof Grabania 4711066490 Removed empty string param in _deprecated_function function (#12301)
`_deprecated_function` has conditional which is checking if third param (replacement) is null. Passing replacement as empty string to this function will fail this test and the end of triggered error will look like this: `Use instead.` instead of `with no alternative available.`. This PR removes all occurrences of empty strings in this function.
2016-11-10 10:17:32 +00:00
Dwain Maralack c27fd5c052 Check if the chosen method is set on the package rates. There are rare instances where store manager may disable a shipping option while the users session is still in progress. This results in an unexpected errors and checkout page hanging. Double checking that the chosen method is accessable on the package avoids the error. (#12111) 2016-10-18 11:38:44 +01:00
Aristeides Stathopoulos 734f284fa4 WordPress.PHP.YodaConditions.NotYoda 2016-09-08 01:32:24 +03:00
Aristeides Stathopoulos ff852038c9 WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys 2016-08-27 06:11:30 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Mike Jolley 0667c1cde1 Remove option based tools 2016-08-24 17:35:13 +01:00
Mike Jolley 84487d0f4b Shipping debug mode moved to shipping settings 2016-08-24 16:55:34 +01:00
Mike Jolley d4cc1f80d4 [2.6] Fix ship to specific counties option
Fixes #11642
2016-08-10 12:04:52 +01:00
Mike Jolley 6e1a640b1c Prevent dirty sessions by removing data objects from the package hash
Closes #11269
2016-08-02 17:10:26 +01:00
Claudio Sanches 7d9d091767 Fixed mixed tabs and spaces 2016-07-11 16:56:35 +02:00
Mike Jolley 3ab6a22146 Match zones with no countries 2016-06-20 13:22:58 +01:00
Mike Jolley 291a997161 Don't show debug on checkout
Closes #11166
2016-06-17 13:21:59 +01:00
Mike Jolley 7266e020fb Avoid normalization of zone postcodes so wildcard matching can be performed on postcodes with spaces. E.g. SP1 *
Also adds matching zone notice when shipping debug is on.

fixes #11154
2016-06-16 11:28:53 +01:00
Mike Jolley 032e57d602 If shipping method count changes, reset to default. 2016-06-15 14:38:08 +01:00
Mike Jolley 5329baee0a shipping_methods can be null 2016-06-07 14:24:10 +01:00
Mike Jolley 847dea6a2d docs/vars 2016-06-07 14:02:02 +01:00
Mike Jolley 730019ef18 scrutinizer best practice 2016-06-06 19:39:23 +01:00
Mike Jolley 3fd15ad50f Unused vars and code docs 2016-06-06 18:57:24 +01:00
Mike Jolley 18b45f55cd @claudiosmweb unregister_shipping_methods didn't unset correctly - this fixes unit tests 2016-05-26 13:03:40 +01:00
Mike Jolley 54231c2946 Allow shipping classes interface to be extended. 2016-05-19 12:38:28 +01:00
JeroenSormani 17878e3ffd Add extra 'chosen_method' argument to the 'wc_shipping_chosen_method' hook 2016-05-19 10:28:54 +02:00
Mike Jolley 15402c2c3d Store separate cache per package_key
Fixes #10872
2016-05-06 17:00:01 +01:00
Thiago Benvenuto 1847b0fab5 Adjusted since version 2016-03-15 20:31:39 -03:00
Thiago Benvenuto 180a09f52c Added docblock to filter
Removed duplicated filter

Renamed filter after shipping costs are calculated
2016-03-15 20:31:39 -03:00
Thiago Benvenuto 30a06d85df Fixed identation mistake 2016-03-15 20:31:39 -03:00
Thiago Benvenuto 7832039bb7 Implemented packages filter for marketplace 2016-03-15 20:31:39 -03: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
Diego Zanella 8426e5cda0 Simplified last change 2016-02-10 21:25:05 +00:00
Diego Zanella 69a97d1af9 Postponed call to woocommerce_shipping_methods filter
* The filter should be called after adding all shipping methods, to provide a complete set of data to consumers that hook into it.
2016-02-10 21:22:44 +00:00
Mike Jolley 75c264837f Justins feedback/code tidy 2016-02-10 13:21:16 +00:00
Mike Jolley c661b4c78f JSlint 2016-01-13 17:08:53 +00:00
Mike Jolley aae956185e merge conflict 2016-01-11 11:49:02 +00:00
Mike Jolley 1076854608 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/class-wc-shipping.php
#	includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
#	includes/shipping/flat-rate/includes/class-wc-eval-math.php
#	includes/shipping/free-shipping/class-wc-shipping-free-shipping.php
#
includes/shipping/legacy-international-delivery/class-wc-shipping-legacy
-international-delivery.php
#
includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-d
elivery.php
2016-01-11 11:48:18 +00:00
Fredrik Forsmo 65d610883f Improve docblock comments in various WP_Shipping classes
* Added comments to various methods
* Removed `method function` from some comments
2016-01-06 16:19:11 +01:00
Mike Jolley 1630913c62 Fix numeric rates 2016-01-05 15:06:39 +00:00
Mike Jolley 97d47fb576 Move zones to main settings 2016-01-05 11:23:15 +00:00
Mike Jolley 119f19a5c1 Include and conditionally load legacy shipping methods 2015-12-18 14:24:34 +00:00
Mike Jolley 8ebba9cc68 "enabled" column 2015-12-16 16:24:58 +00:00
Mike Jolley b47423ff2b Moved rate calc logic into shipping class 2015-12-15 16:22:32 +00:00
Mike Jolley 9818796d3e Removing selection priority
This option was added so you could sort methods in a custom order, but
choose a different default.

Doing this per zone would add extra complexity, and this has also
proven problematic when a method registers multiple rates.

This commit removes usage of the setting. We should use the display
order and choose the top method by default. It think this balances ease
of use with control.
2015-12-15 15:49:35 +00:00
Mike Jolley 041906e692 Shipping class cleanup 2015-12-15 15:39:00 +00:00
Mike Jolley a0e0bb1e55 Load instance methods for calculations 2015-12-15 15:00:45 +00:00
Mike Jolley 6cea054fca Method list screen and method screen with breadcrumbs 2015-12-11 14:11:12 +00:00
Claudio Sanches 37d7dcb396 Prevent erros when unregister shipping methods, closes #9740 2015-12-02 10:46:14 -02:00
Mike Jolley 18e98d8b20 Store shipping rates in session
Rather than use a session which is independent of customer sessions,
store the rates in the session itself to avoid multiple transients.
2015-11-13 20:53:44 +00:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley 705fbef31a [2.4] Default selections fix for methods with multiple rates 2015-10-23 13:49:27 +01:00
Gabor Javorszky 852ab311e0 Shipping calculation results no longer bleed over
Fixes #9404

Before we decide whether to just return from shipping calculation or
actually calculate it, let's null the values.

Reason for this and not `reset` is because reset also wiped the chosen
shipping method, which might have unintended consequences.

Please test this extensively. You know WooCommerce a lot better than I
do, and I'd like to avoid side effects.
2015-10-21 21:35:58 +01:00