Commit Graph

55 Commits

Author SHA1 Message Date
Justin Shreve 1797c76a14 Implement WC_Data_Store and related code & tests. 2016-11-08 01:39:47 -08:00
Mike Jolley 4bddeee695 Fix shipping sorting display 2016-10-20 10:58:44 +01:00
Mike Jolley 2396c0e18e Fix new zone 2016-10-11 11:53:07 +01:00
Mike Jolley 2d270fb405 Fix saving and rest of world 2016-10-10 18:41:07 +01:00
Mike Jolley 83cc0c7066 Work on shipping zone screens 2016-09-24 03:22:57 +01:00
Mike Jolley b5cb254941 Add zone ID for bw comp 2016-09-12 22:16:32 +01:00
Justin Shreve e1e6c682b5 * Stop using _ as a prefix for protected or private vars and functions. We have a keyword for that.
* Introduces set_id and get_id to WC_Data for the CRUD classes to share
2016-09-09 05:36:54 -07:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Aristeides Stathopoulos f2730eea02 WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd 2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos 6c30f84fa2 WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys 2016-08-27 06:23:21 +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
Justin Shreve 849a208e54 Fix issues based on feedback. Make sure to use WC_Shipping_Zone's methods when avaiable, fix up some coding standards, and add a new delete_shipping_method to WC_Shipping_Zone 2016-08-26 04:57:30 -07:00
Mike Jolley 1e037684eb [2.6] Rest of the world ID 0 zone handling
Fixes #11688 Using NULL rather than 0 as default so rest of the world
can be treated different to a new zone. Prevents dupes.
2016-08-25 15:41:47 +01:00
Mike Jolley 72a5f9a9d1 Maintain method_order sorting for zones in list
Closes #11486
2016-07-21 14:30:05 +01:00
Dwain Maralack 34810062eb use strict comparison for in array check because index of zero 0 == anystring will be true, which results in an error notice 2016-07-08 14:30:38 +02:00
Mike Jolley 856b9514d7 Convert ellipsis to three periods when saving postcodes.
Fixes #11195
2016-06-21 10:57:03 +01:00
Mike Jolley 3ab6a22146 Match zones with no countries 2016-06-20 13:22:58 +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 1da23584f0 wc_normalize_postcode on tax and shipping postcode SAVE 2016-06-06 16:17:15 +01:00
Mike Jolley 1e72f2ba86 Clear cache after adding new method 2016-05-25 12:56:53 +01:00
Claudio Sanches 8709d31f41 Fixed method returning value in write context 2016-05-24 18:47:17 -03:00
Mike Jolley 22291e3ead Generate a zone name if left blank
@coderkevin
2016-05-24 18:59:35 +01:00
Joey Kudish 7f71376418 add action hooks for shipping zone method actions
Adds action hooks for shipping zone methods added, deleted and status
toggled
2016-05-10 11:43:47 -07:00
Mike Jolley 10f16f074c Further zone tweaks to delete new rows on cancel 2016-04-22 12:24:20 +01:00
Mike Jolley 5f6aa6c160 Fix modals and ajax events 2016-03-24 19:06:51 +00:00
Mike Jolley 8b53d1a618 Only load modal if supported 2016-03-24 18:31:39 +00:00
Mike Jolley d3ac3f4073 Modals first pass 2016-03-24 17:26:40 +00:00
Mike Jolley 5307f13da7 WC_data abstract compat 2016-03-17 15:22: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
Allen Snook bdb816f83b Use a PHP 5.2 compatible approach for creating new instances of
shipping methods which were registered using an instance
2016-02-25 11:56:05 -08:00
Allen Snook 1ea53460f2 Construct copy of instance of shipping method and pass instance id to it 2016-02-25 11:29:10 -08:00
Diego Zanella d4ada2c4d7 Added new filter in Shipping Zone
* The filter will allow 3rd parties to process the INSTANCES of the shipping methods loaded for a zone.
2016-02-13 23:23:10 +00:00
Mike Jolley c8ce66f1f1 Code formatting 2016-02-11 13:16:21 +00:00
Diego Zanella 6d0f844d2b Fix - Handled case in which the list of method "classes" contains objects
* Method `WC_Shipping::get_shipping_method_class_names()` returns an array that may contain shipping classes or shipping instances. Class `WC_Shipping_Zone` must be able to handle this condition.
2016-02-10 23:18:18 +00:00
Mike Jolley 75c264837f Justins feedback/code tidy 2016-02-10 13:21:16 +00:00
Mike Jolley 140d97ad10 docblock 2016-02-05 15:30:44 +00:00
Mike Jolley 98883e07ba Use interface 2016-02-05 15:20:17 +00:00
Claudio Sanches 084ba34bb6 Invalidade shipping costs transient when save zones 2016-01-19 16:44:41 -02:00
Claudio Sanches 0d2a77d4de Fixed display of encoded characters 2016-01-19 16:21:08 -02:00
Mike Jolley 6a8819fc23 Text changes 2016-01-13 12:31:10 +00:00
Mike Jolley bdb8de7785 Zone unit tests 2016-01-08 14:53:24 +00:00
Mike Jolley 77f0e9d72a has settings handling 2015-12-18 13:12:20 +00:00
Mike Jolley 8ebba9cc68 "enabled" column 2015-12-16 16:24:58 +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 7f61beee41 Worldwide zone handling 2015-12-15 18:04:14 +00:00
Mike Jolley 44b2834d73 Worldwide zones needs handling 2015-12-15 17:54:51 +00:00
Mike Jolley e25d876779 List and sort methods within zones 2015-12-15 17:48:03 +00:00
Mike Jolley 091a8a7641 Zone matching functions 2015-12-15 12:39:52 +00:00