diff --git a/assets/css/admin-styles.css b/assets/css/admin-styles.css
index 8e2a3bbeb49fae81259a1a295e30b39ad62a465f..233e6f480f5efe14a5a860b1ccf82b8f0796216b 100644
--- a/assets/css/admin-styles.css
+++ b/assets/css/admin-styles.css
@@ -1,109 +1,24 @@
-table.rules_shipping_methods th {
-	padding-left: 10px;
-}
-table.rules_shipping_methods .name {
-	
-}
-table.rules_shipping_methods.widefat {
-	background: inherited;
-}
-
-div.shipping_rules_ruleset {
-	background: #f8f8f8;
-	border: #D0D0D0 1px solid;
-	margin-bottom: 20px;
-	margin-top: 20px;
-}
-
-#shipping_rules_rulesets .ruleset_openclose {
-  cursor: pointer;
-  float: right;
-  width: 27px;
-  height: 30px;
-}
-#shipping_rules_rulesets .shipping_rules_ruleset.closed .inside {
-	display: none;
-}
-
-#shipping_rules_rulesets .shipping_rules_ruleset.closed .ruleset_openclose:before {
-  content: '\f140';
-}
-#shipping_rules_rulesets .shipping_rules_ruleset .ruleset_openclose:before {
-  content: '\f142';
-}
-#shipping_rules_rulesets .ruleset_openclose:before {
-/*   right: 12px; */
-  font: 400 20px/1 dashicons;
-  speak: none;
-  display: inline-block;
-  padding: 2px;
-  top: 0;
-  position: relative;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  text-decoration: none!important;
-	width: 100%;
-	height: 100%;
-}
-
-#poststuff div.shipping_rules_ruleset h3 {
-	padding: 6px 3px;
-}
-
-.form-table td.shipping_rules_rulescell {
-	padding-left: 0;
-}
-
-.form-table textarea.shipping_rules_rule_textarea {
-	width: 100%;
-}
-#shipping_rules_rulesets .form-table th.titledesc {
-	padding-bottom: 12px;
-	padding-top: 8px;
-	font-weight: normal;
-	
-}
-#shipping_rules_rulesets .form-table td.forminp {
-	padding-bottom: 0;
-	padding-top: 0;
-}
-
-
-.ruleset-box-header {
-	width: 100%;
-	height: 30px;
-/* 	border: 1px solid #808080; */
-	border-bottom: 1px solid #D0D0D0;
-}
-.ruleset-box-header .input-wrap {
-	display: block;
-	overflow: hidden;
-	height: 100%;
-}
-.ruleset-box-header input.ruleset_name {
-	width: 100%;
-	margin: 2px 0;
-}
-.ruleset-box-header .ruleset_name_label {
-	float: left;
-	height: 100%;
-	margin-top: 0;
-	margin-bottom: 0;
-}
-
+/*******************************/
+/* CSS for the Upgrade NAG Box */
+/*******************************/
 div#opentools-shippingbyrules-upgrade {
 	padding: 5px 10px;
 }
 div#opentools-shippingbyrules-upgrade.postbox {
   display: inline-block;
 }
-div#opentools-shippingbyrules-upgrade h3 {
+#opentools-shippingbyrules-upgrade h3 {
+    margin: 0;
+    border-bottom: #800000 solid 1px;
+    margin-top: 3px;
+    padding-bottom: 3px;
 }
 div#opentools-shippingbyrules-upgrade ul {
 	list-style: disc;
 /* 	list-style-position: inside; */
 	margin-left: 5px;
 	padding-left: 5px;
+	margin-top: 5px;
 }
 div#opentools-shippingbyrules-upgrade li {
 	margin-left: 2em;
@@ -121,6 +36,12 @@ div#opentools-shippingbyrules-upgrade .logoleft {
 div#opentools-shippingbyrules-upgrade .contents {
 	padding-left: 120px;
 }
+
+
+
+/*******************************/
+/* CSS for the rules help Box  */
+/*******************************/
 ul.otsr_list, ul.otsr_list ul {
 	list-style: disc;
 	padding-left: 10px;
@@ -135,4 +56,17 @@ ul.otsr_list blockquote {
 	background: #f0f0f0;
 	margin: 0;
 	padding: 0.2em 0.5em;
+}
+
+
+/************************************/
+/* CSS for the Shipping methods box */
+/************************************/
+table.rules_shipping_methods.wc-shipping-zones td li, table.rules_shipping_methods.wc-shipping-zones th li {
+    line-height: 1.15em;
+}
+table.rules_shipping_methods.wc-shipping-zones td, table.rules_shipping_methods.wc-shipping-zones th {
+    line-height: 1.15em;
+    padding-top: 5px;
+    padding-bottom: 5px;
 }
\ No newline at end of file
diff --git a/assets/css/legacy-admin-styles.css b/assets/css/legacy-admin-styles.css
new file mode 100644
index 0000000000000000000000000000000000000000..195b669f47121f185f5d90784a43d07955b2f444
--- /dev/null
+++ b/assets/css/legacy-admin-styles.css
@@ -0,0 +1,93 @@
+table.rules_shipping_methods th {
+	padding-left: 10px;
+}
+table.rules_shipping_methods .name {
+	
+}
+table.rules_shipping_methods.widefat {
+	background: inherited;
+}
+
+div.shipping_rules_ruleset {
+	background: #f8f8f8;
+	border: #D0D0D0 1px solid;
+	margin-bottom: 20px;
+	margin-top: 20px;
+}
+
+#shipping_rules_rulesets .ruleset_openclose {
+  cursor: pointer;
+  float: right;
+  width: 27px;
+  height: 30px;
+}
+#shipping_rules_rulesets .shipping_rules_ruleset.closed .inside {
+	display: none;
+}
+
+#shipping_rules_rulesets .shipping_rules_ruleset.closed .ruleset_openclose:before {
+  content: '\f140';
+}
+#shipping_rules_rulesets .shipping_rules_ruleset .ruleset_openclose:before {
+  content: '\f142';
+}
+#shipping_rules_rulesets .ruleset_openclose:before {
+/*   right: 12px; */
+  font: 400 20px/1 dashicons;
+  speak: none;
+  display: inline-block;
+  padding: 2px;
+  top: 0;
+  position: relative;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  text-decoration: none!important;
+	width: 100%;
+	height: 100%;
+}
+
+#poststuff div.shipping_rules_ruleset h3 {
+	padding: 6px 3px;
+}
+
+.form-table td.shipping_rules_rulescell {
+	padding-left: 0;
+}
+
+.form-table textarea.shipping_rules_rule_textarea {
+	width: 100%;
+}
+#shipping_rules_rulesets .form-table th.titledesc {
+	padding-bottom: 12px;
+	padding-top: 8px;
+	font-weight: normal;
+	
+}
+#shipping_rules_rulesets .form-table td.forminp {
+	padding-bottom: 0;
+	padding-top: 0;
+}
+
+
+.ruleset-box-header {
+	width: 100%;
+	height: 30px;
+/* 	border: 1px solid #808080; */
+	border-bottom: 1px solid #D0D0D0;
+}
+.ruleset-box-header .input-wrap {
+	display: block;
+	overflow: hidden;
+	height: 100%;
+}
+.ruleset-box-header input.ruleset_name {
+	width: 100%;
+	margin: 2px 0;
+}
+.ruleset-box-header .ruleset_name_label {
+	float: left;
+	height: 100%;
+	margin-top: 0;
+	margin-bottom: 0;
+}
+
diff --git a/assets/js/shipping-by-rules-config.js b/assets/js/legacy-shipping-by-rules-config.js
similarity index 100%
rename from assets/js/shipping-by-rules-config.js
rename to assets/js/legacy-shipping-by-rules-config.js
diff --git a/assets/js/opentools-updatecheck.js b/assets/js/opentools-updatecheck.js
index 3f8f4070aaa8e16f9f2dfa098720026385a14d28..2eed40ab32d6a24a74f139a98982835f5057b1d6 100644
--- a/assets/js/opentools-updatecheck.js
+++ b/assets/js/opentools-updatecheck.js
@@ -5,21 +5,27 @@ var showUpdateCredentialsRow = function (btn) {
 	var ajaxurl = jQuery(btn).data('ajaxurl');
 	var slug = jQuery(btn).data("slug");
 	var nonce = jQuery(btn).data("nonce");
-	var ajaxargs = {
-		type: "POST",
-		url: ajaxurl,
-		data: {
-			action: 'getUpdateCredentialsRow_'+slug,
-			slug: slug,
-			_ajax_nonce: nonce
-		},
-		success: function ( json ) {
-			jQuery(btn).closest('tr').after(json['row']);
-		},
-		error: function() {  },
-		complete: function() {  },
-	};
-	jQuery.ajax(ajaxargs);
+
+	var credentialRow = jQuery(btn).closest('table').find('tr#'+slug+'-credentials');
+	if (credentialRow.length > 0) {
+		jQuery(credentialRow).fadeOut(1000, function() { jQuery(this).remove(); });
+	} else {
+		var ajaxargs = {
+			type: "POST",
+			url: ajaxurl,
+			data: { 
+				action: 'getUpdateCredentialsRow_'+slug,
+				slug: slug,
+				_ajax_nonce: nonce
+			},
+			success: function ( json ) {
+				jQuery(btn).closest('tr').after(json['row']);
+			},
+			error: function() {  },
+			complete: function() {  },
+		};
+		jQuery.ajax(ajaxargs);
+	}
 	return false;
 };
 
diff --git a/includes/admin/html/html-shipping-methods.php b/includes/admin/html/html-shipping-methods.php
index a0eb924990869a5a4a3b6aa4bdc9101d85082c3d..357d84ad190f495dd0f91ed601240100572f5023 100644
--- a/includes/admin/html/html-shipping-methods.php
+++ b/includes/admin/html/html-shipping-methods.php
@@ -3,132 +3,70 @@
 if ( ! defined( 'ABSPATH' ) ) {
 	exit;
 }
-$methods = get_posts( array( 'posts_per_page' => '-1', 'post_type' => 'shipping_rules', 'post_status' => array( 'draft', 'publish' ) ) );
+$methods = array();
 
 ?>
 <tr valign="top">
-	<th scope="row" class="titledesc"><?php echo $this->helper->__( 'Shipping By Rules Methods' ) ?></th>
-	<td class="forminp" id="<?php echo $this->id; ?>_rules_shipping_methods">
+	<th colspan="2" scope="row" class="titledesc"><?php echo $this->helper->__( 'Configured Shipping By Rules Methods in all shipping zones' ) ?></th>
+</tr>
+<tr valign="top">
+	<td colspan="2" class="forminp" id="<?php echo $this->id; ?>_rules_shipping_methods"><?php echo sprintf($this->helper->__( 'This table shows <a href="%s">all shipping zones</a> and for each zone the shipping methods provided by this plugin.' ), admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ); ?>
 
-		<table class="rules_shipping_methods widefat striped" cellspacing="0">
+		<table class="rules_shipping_methods wc-shipping-zones widefat striped" cellspacing="0">
 			<thead>
 				<tr>
-					<th class="name"    ><?php echo $this->helper->__( 'Name' ); ?></th>
-					<th class="id"      ><?php echo $this->helper->__( 'ID' ); ?></th>
-					<th class="status"  ><?php echo $this->helper->__( 'Status' ); ?></th>
-					<th class="methods" ><?php echo $this->helper->__( 'Configured Rulesets' ); ?></th>
+					<th class="name"    ><?php echo $this->helper->__( 'Zone name' ); ?></th>
+					<th class="methods" ><?php echo $this->helper->__( 'Configured Shipping by Rules methods' ); ?></th>
+					<th class="methods" ><?php echo $this->helper->__( 'Other methods' ); ?></th>
 				</tr>
 			</thead>
-			<tbody>
+			<tbody class="wc-shipping-zone-rows">
 				<?php
-				$i = 0;
-				foreach ( $methods as $method ) {
-					$alt = '';
-// 					$alt 			= ( $i++ ) % 2 == 0 ? 'alternate' : '';
-					?>
-					<tr>
-						<td class="name <?php echo $alt; ?>">
-							<input type="hidden" name="rules_method_order[]" value="<?php echo esc_attr($method->ID); ?>" />
-							<?php echo empty($method->post_title) ? $this->helper->__('Untitled Method') : esc_html($method->post_title); ?>
-							<div class='row-actions'>
-								<span class='edit'>
-									<a href='<?php echo get_edit_post_link( $method->ID ); ?>' title='<?php echo $this->helper->__( 'Edit Method'); ?>'>
-										<?php echo $this->helper->__('Edit'); ?>
-									</a>
-									 |
-								</span>
-								<span class='trash'>
-									<a href='<?php echo get_delete_post_link( $method->ID ); ?>' title='<?php echo $this->helper->__('Delete Method'); ?>'><?php
-										echo $this->helper->__('Delete');
-									?></a>
-								</span>
-							</div>
-					</td>
-					<td class="id">
-						<?php echo esc_html($method->ID); ?>
-					</td>
-					<td class="status">
-
-						<?php 
-						if ( $method->post_status == 'publish' ) { ?>
-						<span class="status-enabled tips" data-tip="<?php echo __ ( 'Enabled', 'woocommerce' ); ?>"><?php echo __ ( 'Enabled', 'woocommerce' ); ?></span>
+				$zones = WC_Shipping_Zones::get_zones();
+				// get_zones does NOT include the global (fallback) zone => add it manually!
+				$globalshippingzone = new WC_Shipping_Zone(0);
+				$globalzone                            = $globalshippingzone->get_data();
+				$globalzone['formatted_zone_location'] = $globalshippingzone->get_formatted_location();
+				$globalzone['shipping_methods']        = $globalshippingzone->get_shipping_methods();
+				$zones[] = $globalzone;
+				foreach ($zones as $zone) {
+				?>
+				<tr>
+					<td class="name"><a href="<?php echo admin_url(sprintf('admin.php?page=wc-settings&tab=shipping&zone_id=%d', $zone['zone_id'] )); ?>"><?php echo $zone['zone_name']; ?> (<?php echo $zone['formatted_zone_location']; ?>)</a></td>
+					<td class="methods wc-shipping-zone-methods ">
+						<ul>
 						<?php
-						} else {
-							echo '-';
-						}
-						?>
-
+						foreach ($zone['shipping_methods'] as $method) {
+							if ($method->id == 'shipping_by_rules') {
+								$methodclass = ($method->enabled=='no')?'method_disabled':'method_enabled';
+								$methodurl = admin_url(sprintf('admin.php?page=wc-settings&tab=shipping&instance_id=%d', $method->instance_id));
+								?>
+								<li class="<?php echo $methodclass;?>"><a href="<?php echo $methodurl;?>"><?php echo $method->title; ?></a></li>
+								<?php
+							}
+// 							print_r($method);
+						} ?>
+						</ul>
 					</td>
-					<td>
+					<td class="methods wc-shipping-zone-methods ">
+						<ul>
 						<?php
-							$rulesetnames = array();
-							$rulesets = get_post_meta( $method->ID, '_rules_shipping_ruleset', true );
-							if (!is_array($rulesets)) { 
-								$rulesets = array();
+						foreach ($zone['shipping_methods'] as $method) {
+							if ($method->id != 'shipping_by_rules') {
+								$methodclass = ($method->enabled=='no')?'method_disabled':'method_enabled';
+								?>
+								<li class="<?php echo $methodclass;?>"><?php echo $method->title; ?></li>
+								<?php
 							}
-							foreach ($rulesets as $ruleset) {
-								if (isset($ruleset['name']) && !empty($ruleset['name'])) {
-									$rulesetnames[] = $ruleset['name'];
-								} else {
-									$rulesetnames[] = $this->helper->__('<Unnamed>');
-								}
-							}
-							if (!empty($rulesetnames)) {
-								echo esc_html(join(", ", $rulesetnames));
-							} else {
-								echo $this->helper->__('<em>No rulesets defined</em>');
-							}
-						?>
+						} ?>
+						</ul>
 					</td>
 				</tr>
-					<?php 
-				}
-				
-				if ( empty( $methods ) ) :
-
-					?><tr>
-						<td colspan='4'><?php echo $this->helper->__( 'There are no Shipping By Rules methods configured yet.' ); ?></td>
-					</tr><?php
-					endif;
-
-			?></tbody>
-			<tfoot>
-				<tr>
-					<th colspan='1' style='padding-left: 10px;'>
-						<a href='<?php echo admin_url( 'post-new.php?post_type=shipping_rules' ); ?>' class='add button'><?php echo $this->helper->__( 'Add Shipping By Rules method' ); ?></a>
-					</th>
-					<th colspan="3">
-						<span class="description"><?php _e( 'Drag and drop the above shipping methods to control their display order.', 'woocommerce' ); ?></span>
-					</th>
-				</tr>
-			</tfoot>
+				<?php 
+				} ?>
+			</tbody>
 		</table>
-		<script type="text/javascript">
-			jQuery(function() {
-
-				// Sorting
-				jQuery('table.rules_shipping_methods tbody').sortable({
-					items:'tr',
-					cursor:'move',
-					axis:'y',
-					handle: 'td',
-					scrollSensitivity:40,
-					helper:function(e,ui){
-						ui.children().each(function(){
-							jQuery(this).width(jQuery(this).width());
-						});
-// 						ui.css('left', '0');
-						return ui;
-					},
-					start:function(event,ui){
-						ui.item.css('background-color','#f6f6f6');
-					},
-					stop:function(event,ui){
-						ui.item.removeAttr('style');
-					}
-				});
-			});
-		</script>
 	</td>
 </tr>
+
 <?php
diff --git a/includes/admin/html/html-upgrade-nag.php b/includes/admin/html/html-upgrade-nag.php
index c557306a0f2909076ef7cf927ebeac60a9f59875..c917f31f495e0ba0f0e6c52db50771da6e62a09d 100644
--- a/includes/admin/html/html-upgrade-nag.php
+++ b/includes/admin/html/html-upgrade-nag.php
@@ -11,16 +11,14 @@ if ( ! defined( 'ABSPATH' ) ) {
 				<div class="logoleft"><a href="<?php echo esc_html($settings['link']); ?>"><img src="<?php echo plugins_url('../../../assets/images/advlogo100.png', __FILE__); ?>"></a></div>
 				<!--p>Advanced features not included in the free plugin include:</p-->
 				<ul>
-					<li><b>Mathematical expressions</b>: shipping costs calculated from mathematical expressions (depending on weight, dimensions, amount, etc.):
+					<li><b>Mathematical expressions</b> for shipping costs (depending on weight, dimensions, amount, etc.):
 					<ul style="font-size: smaller">
 						<li>Shipping costs per kg</li>
 						<li>Percentage shipping cost on the amount, etc.</li>
 					</ul>
-					<li><b>List functions</b>: conditions on certain products, categories, tags or shipping classes</li>
-					<li><b>Conditions for product subsets</b>: Conditions and shipping costs depending on values evaluated only for particular products, categories, tags or shipping classes
+					<li><b>Conditions for product subsets</b>: Conditions / costs depending on particular products, categories, tags or shipping classes
 					<li><b>Alphanumeric Postcodes</b>: Conditions on UK and Canadian postcodes</li>
 					<li><b>Coupon Codes</b>: conditions on coupon codes</li>
-					<li>...</li>
 				</ul>
 				<p>More information and purchase: <a class="button-primary" href="<?php echo esc_html($settings['link']); ?>" target="_blank">Get Support and advanced features</a></p>
 			</div>
diff --git a/includes/rules-shipping-method.php b/includes/rules-shipping-method.php
index fe5f0f7420f7a5ee7476c470fabd4ff24bbfec01..e9a1f48d6e687c261a20963af992634760e4aa03 100644
--- a/includes/rules-shipping-method.php
+++ b/includes/rules-shipping-method.php
@@ -8,6 +8,10 @@
  * License: GPLv3+
 */
 
+if (!defined('ABSPATH')) {
+	exit;
+}
+
 class Shipping_by_Rules extends WC_Shipping_Method {
 	protected $helper = null;
 	/**
@@ -16,7 +20,7 @@ class Shipping_by_Rules extends WC_Shipping_Method {
 	 * @access public
 	 * @return void
 	 */
-	public function __construct() {
+	public function __construct($instance_id = 0) {
 		if (class_exists("RulesShippingFrameworkWooCommerceAdvanced")) {
 			$this->helper = RulesShippingFrameworkWooCommerceAdvanced::getHelper();
 		} else {
@@ -26,9 +30,14 @@ class Shipping_by_Rules extends WC_Shipping_Method {
 			$this->helper = RulesShippingFrameworkWooCommerce::getHelper();
 		}
 		$this->id						= 'shipping_by_rules'; // Id for your shipping method. Should be unique.
-		$this->title  					= $this->helper->__( 'Shipping By Rules');
+		$this->instance_id				= absint( $instance_id );
 		$this->method_title				= $this->helper->__( 'Shipping by Rules' );  // Title shown in admin
 		$this->method_description		= $this->helper->__( 'Define shipping costs by general, text-based rules.' ); // Description shown in admin
+		$this->supports					= array(
+			'settings', // Global settings (not instance-specific)
+			'shipping-zones',
+			'instance-settings',
+		);
 
 		$this->init();
 	}
@@ -44,39 +53,76 @@ class Shipping_by_Rules extends WC_Shipping_Method {
 	 * @return void
 	 */
 	function init() {
+		$this->instance_form_fields		= $this->define_instance_form_fields();
+		$this->form_fields				= $this->define_global_form_fields();
+		$this->title  					= $this->get_option('title');
+		$this->tax_status				= $this->get_option('tax_status');
+		$this->rules					= $this->get_option('rules');
+		
+	
 		$this->init_form_fields();
 		$this->init_settings();
 
-		$this->enabled            = $this->get_option ('enabled');
-
 		// Save settings in admin if you have any defined
 		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
-		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_shipping_rules_sorting' ) );
 	}
-
-	/**
-	* Initialise Settings Form Fields
-	*
-	* @access public
-	* @return void
-	*/
-	public function init_form_fields() {
-		add_filter( 'woocommerce_admin_field_opentools_shippingbyrules_upgrade', array( &$this, 'admin_field_opentools_shippingbyrules_upgrade') );
-		$fields = array_merge(
+	
+	function define_global_form_fields() {
+		return array_merge(
 			$this->helper->getUpgradeNagSettings(),
 			array(
-				'enabled' => array(
-					'title' 		=> __( 'Enable/Disable', 'woocommerce' ),
-					'type' 			=> 'checkbox',
-					'label' 		=> $this->helper->__( 'Enable Shipping By Rules'),
-					'default' 		=> 'yes'
+/*				'debug' => array(
+					'title'   => $this->helper->__('Enable debug messages'),
+					'type'    => 'checkbox',
+					'label'   => $this->helper->__('If enabled and WP_DEBUG is set, all defined variables and their values are printed into the WordPress debug log.' ),
+					'default' => 'no'
 				),
+				'global_rules' => array(
+					'title'			=> $this->helper->__('Global definitions:'),
+					'type'			=> 'textarea',
+					'css'			=> '',
+					'description'			=> $this->helper->__('Global definitions are prepended to all rule sets and will be available in all Shipping by Rules methods of all shipping zones. Do NOT include a rule that sets Shipping=... or NoShipping, as this will override all other rules!'),
+					'class'			=> 'shipping_rules_rule_textarea',
+					'placeholder'	=> $this->helper->__('Definitions of the form: Variable=MyVar; Amount>100; [...Conditions...]; Value=123'),
+				),*/
 				'methods' => array(
 					'type' => 'rules_shipping_methods',
 				),
 			)
 		);
-		$this->form_fields = $fields;
+	}
+	
+	function define_instance_form_fields() {
+		return array_merge(
+			$this->helper->getUpgradeNagSettings(),
+			
+			array(
+				'title' => array(
+					'title' 		=> __( 'Method Title', 'woocommerce' ),
+					'type' 			=> 'text',
+					'description' 	=> __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
+					'default'		=> __( 'Shipping by Rules', 'woocommerce' ),
+					'desc_tip'		=> true
+				),
+				'tax_status' => array(
+					'title' 		=> __( 'Tax Status', 'woocommerce' ),
+					'type' 			=> 'select',
+					'class'         => 'wc-enhanced-select',
+					'default' 		=> 'taxable',
+					'options'		=> array(
+						'taxable' 	=> __( 'Taxable', 'woocommerce' ),
+						'none' 		=> _x( 'None', 'Tax status', 'woocommerce' )
+					)
+				),
+				'rules' => array(
+					'title'			=> __('Rules:', 'opentools-shippingrules'),
+					'type'			=> 'textarea',
+					'css'			=> '',
+					'class'			=> 'shipping_rules_rule_textarea',
+					'placeholder'	=> __('Rules of the form: Name="Rule name"; Amount>100; [...Conditions...]; Shipping=3', 'opentools-shippingrules'),
+				),
+			)
+		);
 	}
 
 	/**
@@ -104,6 +150,25 @@ class Shipping_by_Rules extends WC_Shipping_Method {
 		return false;
 	}
 	
+
+	public function getUpgradeNagSettings() {
+		$settings = array();
+		if (!$this->isAdvanced()) {
+			add_filter( 'woocommerce_admin_field_opentools_shippingbyrules_upgrade', array( &$this, 'admin_field_opentools_shippingbyrules_upgrade') );
+			$settings['opentools_shippingbyrules_upgrade'] = array(
+				'name' 		=> $this->__( 'Upgrade to the ADVANCED VERSION of the OpenTools Shipping by Rules plugin'),
+				'type' 		=> 'opentools_shippingbyrules_upgrade',
+				'link'		=> 'http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html',
+			);
+		}
+		return $settings;
+	}
+	
+	public function printUpgradeNagBox($settings) {
+		include plugin_dir_path( __FILE__ ) . 'admin/html/html-upgrade-nag.php';
+	}
+	
+	
 	/**
 	* generate_rules_shipping_methods_html function.
 	*
@@ -126,15 +191,6 @@ class Shipping_by_Rules extends WC_Shipping_Method {
 	}
 
 
-	/** 
-	 * Handle shipping rules settings
-	 */
-	public function process_shipping_rules_sorting() {
-		$ordering = isset($_POST[ 'rules_method_order']) ? array_map( 'wc_clean', $_POST[ 'rules_method_order'] ) : array();
-		$this->helper->set_method_ordering($ordering);
-	}
-
- 
 	/**
 	 * calculate_shipping function.
 	 *
@@ -143,25 +199,21 @@ class Shipping_by_Rules extends WC_Shipping_Method {
 	 * @return void
 	 */
 	public function calculate_shipping( $package = array()) {
-		$methods = $this->helper->get_rule_shipping_methods();
-		foreach ($methods as $method) {
+		$rate = array(
+			'id'		=> $this->get_rate_id(),
+			'label'		=> $this->title,
+			'cost'		=> 0,
+			'package'	=> $package,
+		);
 
-			$rates = $this->helper->getCosts($package, $method);
-			foreach ($rates as $r) {
-				$label = $r['name'];
-				if (isset($r['rulename']) && !empty($r['rulename'])) {
-					$label .= ' (' . $r['rulename'] . ')';
-				}
-				$rate = array(
-					'id' => $this->id . $r['method'],
-					'label' => $label,
-					'package' => $package,
-					'cost' => $r['cost'],
-// 					'calc_tax' => 'per_item',
-				);
-				// Register the rate
-				$this->add_rate( $rate );
+		$rates = $this->helper->getCosts($package, $this);
+		foreach ($rates as $r) {
+			if (isset($r['rulename']) && !empty($r['rulename'])) {
+				$rate['label'] = $this->title . ' (' . $r['rulename'] . ')';
 			}
+			$rate['cost'] = $r['cost'];
+			$this->add_rate( $rate );
 		}
+
 	}
 }
diff --git a/includes/rules_shipping_framework_woocommerce.php b/includes/rules_shipping_framework_woocommerce.php
index d23392862ce602773c61cd1833d3607080f07159..73833109b7e929170be3982d64d3066cff0df79e 100644
--- a/includes/rules_shipping_framework_woocommerce.php
+++ b/includes/rules_shipping_framework_woocommerce.php
@@ -97,22 +97,20 @@ class RulesShippingFrameworkWooCommerce extends RulesShippingFramework {
 	}
 	
 	protected function getMethodId($method) {
-		return $method->ID;
+		return $method->get_rate_id();
 	}
 
 	protected function getMethodName($method) {
-		return $method->post_title;
+		return $method->title;
 	}
 
+	// TODO: Legacy
 	protected function parseMethodRules (&$method) {
-		$rulesets = Shipping_Rules_post_type::get_rulesets($method);
-		foreach ($rulesets as $ruleset) {
-			$this->parseMethodRule(
-				/* Rules */    isset($ruleset['rules'])?$ruleset['rules']:'', 
-				/* Countries */isset($ruleset['countries'])?$ruleset['countries']:array(), 
-				/* Rule info */array(), 
-				/* Method */   $method);
-		}
+		return $this->parseMethodRule(
+			/* Rules */    isset($method->rules)?$method->rules:'',
+			/* Countries */array(),
+			/* Rule info */array(),
+			/* Method */   $method);
 	}
 
 	/**
@@ -300,6 +298,8 @@ class RulesShippingFrameworkWooCommerce extends RulesShippingFramework {
 			'zip4'     => substr($zip,0,4),
 			'zip5'     => substr($zip,0,5),
 			'zip6'     => substr($zip,0,6),
+			'zipnumeric'  => preg_replace('/[^0-9]/', '', $zip),
+			'zipalphanum' => preg_replace('/[^a-zA-Z0-9]/', '', $zip),
 			'city'     => trim($address['city']),
 			'country'  => trim($address['country']),
 			'state'    => trim($address['state']),
@@ -450,30 +450,6 @@ class RulesShippingFrameworkWooCommerce extends RulesShippingFramework {
 		return $result;
 	}
 	
-	/**
-	* get_shipping_rules_methods function.
-	*/
-	static public function get_rule_shipping_methods() {
-		$unsortedmethods = get_posts (array ('posts_per_page' => '-1', 'post_type' => 'shipping_rules'));
-		$ordering = get_option( self::$_method_ordering, array() );
-		$methods = array();
-		foreach ($ordering as $o) {
-			foreach ($unsortedmethods as $key=>$m) {
-				if ($m->ID == $o) {
-					$methods[$o] = $m;
-					unset($unsortedmethods[$key]);
-					break;
-				}
-			}
-		}
-		$methods = $methods + $unsortedmethods;
-		return $methods;
-	}
-	
-	static public function set_method_ordering($ordering) {
-		update_option( self::$_method_ordering, $ordering );
-	}
-
 	protected function createMethodRule ($r, $countries, $ruleinfo) {
 		return new ShippingRule($this, $r, $countries, $ruleinfo);
 	}
diff --git a/legacy-includes/admin/html/html-shipping-methods.php b/legacy-includes/admin/html/html-shipping-methods.php
new file mode 100644
index 0000000000000000000000000000000000000000..a0eb924990869a5a4a3b6aa4bdc9101d85082c3d
--- /dev/null
+++ b/legacy-includes/admin/html/html-shipping-methods.php
@@ -0,0 +1,134 @@
+<?php
+
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+$methods = get_posts( array( 'posts_per_page' => '-1', 'post_type' => 'shipping_rules', 'post_status' => array( 'draft', 'publish' ) ) );
+
+?>
+<tr valign="top">
+	<th scope="row" class="titledesc"><?php echo $this->helper->__( 'Shipping By Rules Methods' ) ?></th>
+	<td class="forminp" id="<?php echo $this->id; ?>_rules_shipping_methods">
+
+		<table class="rules_shipping_methods widefat striped" cellspacing="0">
+			<thead>
+				<tr>
+					<th class="name"    ><?php echo $this->helper->__( 'Name' ); ?></th>
+					<th class="id"      ><?php echo $this->helper->__( 'ID' ); ?></th>
+					<th class="status"  ><?php echo $this->helper->__( 'Status' ); ?></th>
+					<th class="methods" ><?php echo $this->helper->__( 'Configured Rulesets' ); ?></th>
+				</tr>
+			</thead>
+			<tbody>
+				<?php
+				$i = 0;
+				foreach ( $methods as $method ) {
+					$alt = '';
+// 					$alt 			= ( $i++ ) % 2 == 0 ? 'alternate' : '';
+					?>
+					<tr>
+						<td class="name <?php echo $alt; ?>">
+							<input type="hidden" name="rules_method_order[]" value="<?php echo esc_attr($method->ID); ?>" />
+							<?php echo empty($method->post_title) ? $this->helper->__('Untitled Method') : esc_html($method->post_title); ?>
+							<div class='row-actions'>
+								<span class='edit'>
+									<a href='<?php echo get_edit_post_link( $method->ID ); ?>' title='<?php echo $this->helper->__( 'Edit Method'); ?>'>
+										<?php echo $this->helper->__('Edit'); ?>
+									</a>
+									 |
+								</span>
+								<span class='trash'>
+									<a href='<?php echo get_delete_post_link( $method->ID ); ?>' title='<?php echo $this->helper->__('Delete Method'); ?>'><?php
+										echo $this->helper->__('Delete');
+									?></a>
+								</span>
+							</div>
+					</td>
+					<td class="id">
+						<?php echo esc_html($method->ID); ?>
+					</td>
+					<td class="status">
+
+						<?php 
+						if ( $method->post_status == 'publish' ) { ?>
+						<span class="status-enabled tips" data-tip="<?php echo __ ( 'Enabled', 'woocommerce' ); ?>"><?php echo __ ( 'Enabled', 'woocommerce' ); ?></span>
+						<?php
+						} else {
+							echo '-';
+						}
+						?>
+
+					</td>
+					<td>
+						<?php
+							$rulesetnames = array();
+							$rulesets = get_post_meta( $method->ID, '_rules_shipping_ruleset', true );
+							if (!is_array($rulesets)) { 
+								$rulesets = array();
+							}
+							foreach ($rulesets as $ruleset) {
+								if (isset($ruleset['name']) && !empty($ruleset['name'])) {
+									$rulesetnames[] = $ruleset['name'];
+								} else {
+									$rulesetnames[] = $this->helper->__('<Unnamed>');
+								}
+							}
+							if (!empty($rulesetnames)) {
+								echo esc_html(join(", ", $rulesetnames));
+							} else {
+								echo $this->helper->__('<em>No rulesets defined</em>');
+							}
+						?>
+					</td>
+				</tr>
+					<?php 
+				}
+				
+				if ( empty( $methods ) ) :
+
+					?><tr>
+						<td colspan='4'><?php echo $this->helper->__( 'There are no Shipping By Rules methods configured yet.' ); ?></td>
+					</tr><?php
+					endif;
+
+			?></tbody>
+			<tfoot>
+				<tr>
+					<th colspan='1' style='padding-left: 10px;'>
+						<a href='<?php echo admin_url( 'post-new.php?post_type=shipping_rules' ); ?>' class='add button'><?php echo $this->helper->__( 'Add Shipping By Rules method' ); ?></a>
+					</th>
+					<th colspan="3">
+						<span class="description"><?php _e( 'Drag and drop the above shipping methods to control their display order.', 'woocommerce' ); ?></span>
+					</th>
+				</tr>
+			</tfoot>
+		</table>
+		<script type="text/javascript">
+			jQuery(function() {
+
+				// Sorting
+				jQuery('table.rules_shipping_methods tbody').sortable({
+					items:'tr',
+					cursor:'move',
+					axis:'y',
+					handle: 'td',
+					scrollSensitivity:40,
+					helper:function(e,ui){
+						ui.children().each(function(){
+							jQuery(this).width(jQuery(this).width());
+						});
+// 						ui.css('left', '0');
+						return ui;
+					},
+					start:function(event,ui){
+						ui.item.css('background-color','#f6f6f6');
+					},
+					stop:function(event,ui){
+						ui.item.removeAttr('style');
+					}
+				});
+			});
+		</script>
+	</td>
+</tr>
+<?php
diff --git a/legacy-includes/admin/html/html-upgrade-nag.php b/legacy-includes/admin/html/html-upgrade-nag.php
new file mode 100644
index 0000000000000000000000000000000000000000..c557306a0f2909076ef7cf927ebeac60a9f59875
--- /dev/null
+++ b/legacy-includes/admin/html/html-upgrade-nag.php
@@ -0,0 +1,28 @@
+<?php
+
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
+?>
+		<div id="opentools-shippingbyrules-upgrade" class="rules_shipping rules_shipping_upgrade rules_shipping_meta_box rules_shipping_settings_meta_box postbox">
+			<?php if (isset($settings['title'])) { ?><h3><?php echo esc_html($settings['title']); ?></h3><?php } ?>
+			<div class="contents">
+				<div class="logoleft"><a href="<?php echo esc_html($settings['link']); ?>"><img src="<?php echo plugins_url('../../../assets/images/advlogo100.png', __FILE__); ?>"></a></div>
+				<!--p>Advanced features not included in the free plugin include:</p-->
+				<ul>
+					<li><b>Mathematical expressions</b>: shipping costs calculated from mathematical expressions (depending on weight, dimensions, amount, etc.):
+					<ul style="font-size: smaller">
+						<li>Shipping costs per kg</li>
+						<li>Percentage shipping cost on the amount, etc.</li>
+					</ul>
+					<li><b>List functions</b>: conditions on certain products, categories, tags or shipping classes</li>
+					<li><b>Conditions for product subsets</b>: Conditions and shipping costs depending on values evaluated only for particular products, categories, tags or shipping classes
+					<li><b>Alphanumeric Postcodes</b>: Conditions on UK and Canadian postcodes</li>
+					<li><b>Coupon Codes</b>: conditions on coupon codes</li>
+					<li>...</li>
+				</ul>
+				<p>More information and purchase: <a class="button-primary" href="<?php echo esc_html($settings['link']); ?>" target="_blank">Get Support and advanced features</a></p>
+			</div>
+		</div>
+<?php
diff --git a/includes/admin/settings/meta-box-field-ruleset.php b/legacy-includes/admin/settings/meta-box-field-ruleset.php
similarity index 100%
rename from includes/admin/settings/meta-box-field-ruleset.php
rename to legacy-includes/admin/settings/meta-box-field-ruleset.php
diff --git a/legacy-includes/admin/settings/meta-box-help.php b/legacy-includes/admin/settings/meta-box-help.php
new file mode 100644
index 0000000000000000000000000000000000000000..80e53fad133fdee890c283cd06460f1e559259a4
--- /dev/null
+++ b/legacy-includes/admin/settings/meta-box-help.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Shipping By Rules meta box Help.
+ *
+ * Display the help message / user guide for the Shipping by Rules Method.
+ *
+ * @author		Reinhold Kainhofer
+ * @package		OpenTools Shipping by Rules for WooCommerce
+ * @version		1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
+
+?><div class='rules_shipping rules_shipping_help rules_shipping_meta_box rules_shipping_help_meta_box'>
+		<p>See also the the <a href='http://open-tools.net/documentation/advanced-shipping-by-rules-for-woocommerce.html'>Plugin's documentation</a> and <a href='http://open-tools.net/documentation/shipping-by-rules-plugins-for-virtuemart/rules-examples.html'>Rules Examples</a>.</p>
+		<ul class='otsr_list'>
+			<li>One rule per line, rule parts separated by Semicolon (;)</li>
+			<li>Rules are evaluated sequentially, first matching rule is offered</li>
+			<li>Typical form of a rule:
+			<blockquote>
+			Name="Rule name"; Amount&lt;50; 1000&lt;=ZIP&lt;2000; Shipping=123
+			</blockquote></li>
+			<li>Setting costs to NoShipping prevents method from offering any shipping</li>
+			<li>Conditions can contain <strong>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</strong>, variables and functions.</li>
+			<li>Some <strong>variables (case-insensitive)</strong>: 
+				<ul>
+					<li><tt>Amount</tt>, <tt>Weight</tt>, <tt>ZIP</tt>, <tt>Products</tt> (number of products), <tt>Articles</tt> (counted with quantity), <tt>Volume</tt> (total volume of the order), <tt>Min/MaxVolume</tt>, <tt>Min/MaxLength</tt>, <tt>Min/MaxWidth</tt>, <tt>Min/MaxHeight</tt>, ....</li>
+				</ul>
+			</li>
+			<!--li>All rule parts of the form <strong><tt>[VARIABLE]=VALUE</tt> are assignments</strong>; allowed variables are 
+				<ul>
+					<li><strong><tt>Name</tt></strong> (of the rule), </li>
+					<li><strong><tt>Shipping</tt></strong>, </li>
+					<li><strong><tt>ShippingWithTax</tt></strong>, </li>
+					<li><strong><tt>ExtraShippingCharge</tt></strong>, </li>
+					<li><strong><tt>ExtraShippingMultiplier</tt></strong>, </li>
+					<li><strong><tt>Condition</tt></strong>, </li>
+					<li><strong><tt>Variable</tt></strong>, </li>
+					<li><strong><tt>Value</tt></strong>, </li>
+					<li><strong><tt>Comment</tt></strong>.</li>
+				</ul>
+				The '<tt>Shipping='</tt> can be left out.</li-->
+			<li>In the <a href="http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html">advanced version</a>, all expressions may contain <strong>arbitrary basic arithmetic expressions (+, -, *, /, %, ^ and parentheses)</strong> of the above variables and functions like max(..), min(..), round(..), ceil(..), floor(..), day(), month(), etc..</li>
+			<li><strong>Alphanumeric postal codes</strong>: variables <tt>UK_Outward, UK_Area, UK_District, UK_Subdistrict, Canada_FSA, Canada_Area, Canada_Urban, Canada_Subarea, ZIP1, ZIP2, ZIP3, ZIP4, ZIP5</tt> and <tt>ZIP6</tt> in the <a href="http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html">advanced version</a>.</li>
+		</ul>
+		<p>EXAMPLE: A rule named 'Europe' that sets shipping costs of 5€ for orders weighing less than 5kg, 10€ for heavier orders, and free shipping from 100€ on would be:</p>
+		<blockquote><tt>Name=Free Shipping; 100&lt;= Amount; 0<br/>Name=Europe; Weight&lt;5; Shipping=5<br/>Name=Europe; Weight>=5; Shipping=10</tt></blockquote>
+		
+
+</div>
+<?php 
\ No newline at end of file
diff --git a/includes/admin/settings/meta-box-rulesets.php b/legacy-includes/admin/settings/meta-box-rulesets.php
similarity index 100%
rename from includes/admin/settings/meta-box-rulesets.php
rename to legacy-includes/admin/settings/meta-box-rulesets.php
diff --git a/includes/admin/settings/meta-box-settings.php b/legacy-includes/admin/settings/meta-box-settings.php
similarity index 100%
rename from includes/admin/settings/meta-box-settings.php
rename to legacy-includes/admin/settings/meta-box-settings.php
diff --git a/legacy-includes/legacy-rules-shipping-method.php b/legacy-includes/legacy-rules-shipping-method.php
new file mode 100644
index 0000000000000000000000000000000000000000..bc331ad35b6ef55cfae795c53a475ebb1f89845f
--- /dev/null
+++ b/legacy-includes/legacy-rules-shipping-method.php
@@ -0,0 +1,184 @@
+<?php
+/**
+ * Shipping By Rules Shipping Method
+ * http://open-tools.net/woocommerce/
+ * Define Shipping cost by very general and flexible (text-based) rules.
+ * Ver. 1.0.0
+ * Author: Open Tools, Reinhold Kainhofer
+ * License: GPLv3+
+*/
+
+class Legacy_Shipping_by_Rules extends WC_Shipping_Method {
+	protected $helper = null;
+	/**
+	 * Constructor for your shipping class
+	 *
+	 * @access public
+	 * @return void
+	 */
+	public function __construct() {
+		if (class_exists("LegacyRulesShippingFrameworkWooCommerceAdvanced")) {
+			$this->helper = LegacyRulesShippingFrameworkWooCommerceAdvanced::getHelper();
+		} else {
+			if (!class_exists("LegacyRulesShippingFrameworkWooCommerce")) {
+				require_once( plugin_dir_path( __FILE__ ) . 'legacy-rules_shipping_framework_woocommerce.php');
+			}
+			$this->helper = LegacyRulesShippingFrameworkWooCommerce::getHelper();
+		}
+		$this->id						= 'legacy-shipping_by_rules'; // Id for your shipping method. Should be unique.
+		$this->title  					= $this->helper->__( 'Shipping By Rules (legacy)');
+		$this->method_title				= $this->helper->__( 'Shipping by Rules (legacy)' );  // Title shown in admin
+		$this->method_description		= sprintf($this->helper->__('<strong>This method is deprecated in WooCommerce 2.6, where shipping zones are introduced, and will be removed in future versions.</strong> Please use WooCommerce\'s shipping zones for country restrictions and set up methods of type "Shipping by Rules" inside each shipping zone. Your existing rules and this legacy shipping method will continue to work until you manually transfer all rules to the <a href="%s">Shipping Zones</a>. and remove all Shipping by Rules methods here.'), admin_url( 'admin.php?page=wc-settings&tab=shipping' ) );
+		$this->init();
+	}
+	
+	public function setHelper($helper) {
+		$this->helper = $helper;
+	}
+
+	/**
+	 * Init your settings
+	 *
+	 * @access public
+	 * @return void
+	 */
+	function init() {
+		$this->init_form_fields();
+		$this->init_settings();
+
+		$this->enabled            = $this->get_option ('enabled');
+
+		// Save settings in admin if you have any defined
+		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
+		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_shipping_rules_sorting' ) );
+	}
+
+	/**
+	* Initialise Settings Form Fields
+	*
+	* @access public
+	* @return void
+	*/
+	public function init_form_fields() {
+		add_filter( 'woocommerce_admin_field_opentools_shippingbyrules_upgrade', array( &$this, 'admin_field_opentools_shippingbyrules_upgrade') );
+		$fields = array_merge(
+			$this->helper->getUpgradeNagSettings(),
+			
+			array(
+				'enabled' => array(
+					'title' 		=> __( 'Enable/Disable', 'woocommerce' ),
+					'type' 			=> 'checkbox',
+					'label' 		=> $this->helper->__( 'Enable Shipping By Rules'),
+					'default' 		=> 'yes'
+				),
+				'methods' => array(
+					'type' => 'legacy_rules_shipping_methods',
+				),
+			)
+		);
+		$this->form_fields = $fields;
+	}
+
+	
+	public function getUpgradeNagSettings() {
+		$settings = array();
+		if (!$this->isAdvanced()) {
+			$settings['opentools_shippingbyrules_upgrade'] = array(
+				'name' 		=> $this->__( 'Upgrade to the ADVANCED VERSION of the OpenTools Shipping by Rules plugin'),
+				'type' 		=> 'opentools_shippingbyrules_upgrade',
+				'link'		=> 'http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html',
+			);
+		}
+		return $settings;
+	}
+	
+	public function printUpgradeNagBox($settings) {
+		include plugin_dir_path( __FILE__ ) . 'admin/html/html-upgrade-nag.php';
+	}
+	
+	/**
+	* generate_rules_shipping_methods_html function.
+	*
+	* @access public
+	* @return string
+	*/
+	public function generate_legacy_rules_shipping_methods_html() {
+		ob_start();
+		include plugin_dir_path( __FILE__ ) . 'admin/html/html-shipping-methods.php';
+		return ob_get_clean();
+	}
+
+	
+	/**
+	* validate_rules_shipping_methods_field function.
+	* Table does not need validation, so always return false.
+	*
+	* @access public
+	* @param mixed $key
+	* @return bool
+	*/
+	public function validate_legacy_rules_shipping_methods_field( $key ) {
+		return false;
+	}
+	
+	/**
+	* generate_rules_shipping_methods_html function.
+	*
+	* @access public
+	* @return string
+	*/
+	public function generate_opentools_shippingbyrules_upgrade_html($id, $settings) {
+		if (isset($settings['name'])) {
+			$settings['title'] = $settings['name'];
+		}
+		ob_start();
+		?>
+		<tr valign="top">
+			<td colspan="2">
+				<?php $this->helper->printUpgradeNagBox($settings); ?>
+			</td>
+		</tr>
+		<?php
+		return ob_get_clean();
+	}
+
+
+	/** 
+	 * Handle shipping rules settings
+	 */
+	public function process_shipping_rules_sorting() {
+		$ordering = isset($_POST[ 'rules_method_order']) ? array_map( 'wc_clean', $_POST[ 'rules_method_order'] ) : array();
+		$this->helper->set_method_ordering($ordering);
+	}
+
+ 
+	/**
+	 * calculate_shipping function.
+	 *
+	 * @access public
+	 * @param mixed $package
+	 * @return void
+	 */
+	public function calculate_shipping( $package = array()) {
+		$methods = $this->helper->get_rule_shipping_methods();
+		foreach ($methods as $method) {
+
+			$rates = $this->helper->getCosts($package, $method);
+			foreach ($rates as $r) {
+				$label = $r['name'];
+				if (isset($r['rulename']) && !empty($r['rulename'])) {
+					$label .= ' (' . $r['rulename'] . ')';
+				}
+				$rate = array(
+					'id' => $this->id . $r['method'],
+					'label' => $label,
+					'package' => $package,
+					'cost' => $r['cost'],
+// 					'calc_tax' => 'per_item',
+				);
+				// Register the rate
+				$this->add_rate( $rate );
+			}
+		}
+	}
+}
diff --git a/includes/rules-shipping-post-type.php b/legacy-includes/legacy-rules-shipping-post-type.php
similarity index 99%
rename from includes/rules-shipping-post-type.php
rename to legacy-includes/legacy-rules-shipping-post-type.php
index f4650b19579f0d35284b31ca9a519b362803489d..b0267441db30a6615a2b9747bd60f8111ccc46fc 100644
--- a/includes/rules-shipping-post-type.php
+++ b/legacy-includes/legacy-rules-shipping-post-type.php
@@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  *
  * Initialize the Shipping by Rules post type (to configure the .
  *
- * @class       Shipping_Rules_post_type
+ * @class       Legacy_Shipping_Rules_post_type
  * @author      Reinhold Kainhofer
  * @package		WooCommerce (Advanced) Shipping By Rules
  * @version		1.0.0
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  * (C) Jeroen Sormani, Licensed under the GPL V3+
  */
 
-class Shipping_Rules_post_type {
+class Legacy_Shipping_Rules_post_type {
 	protected $helper = null;
 
 	/**
diff --git a/legacy-includes/legacy-rules_shipping_framework_woocommerce.php b/legacy-includes/legacy-rules_shipping_framework_woocommerce.php
new file mode 100644
index 0000000000000000000000000000000000000000..74c755ce2d06200519813b1d8a6313a33c82ae08
--- /dev/null
+++ b/legacy-includes/legacy-rules_shipping_framework_woocommerce.php
@@ -0,0 +1,90 @@
+<?php
+/**
+ * Shipping by Rules generic helper class (WP/WooCommerce-specific)
+ * Reinhold Kainhofer, Open Tools, office@open-tools.net
+ * @copyright (C) 2012-2016 - Reinhold Kainhofer
+ * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
+**/
+
+if ( !defined( 'ABSPATH' ) ) { 
+	die( 'Direct Access to ' . basename( __FILE__ ) . ' is not allowed.' );
+}
+require_once( plugin_dir_path( __FILE__ ) . '/../includes/rules_shipping_framework_woocommerce.php');
+
+class LegacyRulesShippingFrameworkWooCommerce extends RulesShippingFrameworkWooCommerce {
+	protected static $_method_ordering	= 'woocommerce_shipping_rules_ordering';
+	
+	static function getHelper() {
+		static $helper = null;
+		if (!$helper) {
+			$helper = new LegacyRulesShippingFrameworkWooCommerce();
+			$helper->setup();
+		}
+		return $helper;
+    }
+
+	protected function getMethodId($method) {
+		return $method->ID;
+	}
+
+	protected function getMethodName($method) {
+		return $method->post_title;
+	}
+
+	protected function parseMethodRules (&$method) {
+		$rulesets = Shipping_Rules_post_type::get_rulesets($method);
+		foreach ($rulesets as $ruleset) {
+			$this->parseMethodRule(
+				/* Rules */    isset($ruleset['rules'])?$ruleset['rules']:'', 
+				/* Countries */isset($ruleset['countries'])?$ruleset['countries']:array(), 
+				/* Rule info */array(), 
+				/* Method */   $method);
+		}
+	}
+
+	/**
+	* get_shipping_rules_methods function.
+	*/
+	static public function get_rule_shipping_methods() {
+		$unsortedmethods = get_posts (array ('posts_per_page' => '-1', 'post_type' => 'shipping_rules'));
+		$ordering = get_option( self::$_method_ordering, array() );
+		$methods = array();
+		foreach ($ordering as $o) {
+			foreach ($unsortedmethods as $key=>$m) {
+				if ($m->ID == $o) {
+					$methods[$o] = $m;
+					unset($unsortedmethods[$key]);
+					break;
+				}
+			}
+		}
+		$methods = $methods + $unsortedmethods;
+		return $methods;
+	}
+	
+	static public function set_method_ordering($ordering) {
+		update_option( self::$_method_ordering, $ordering );
+	}
+
+	protected function createMethodRule ($r, $countries, $ruleinfo) {
+		return new ShippingRule($this, $r, $countries, $ruleinfo);
+	}
+	
+	public function getUpgradeNagSettings() {
+		$settings = array();
+		if (!$this->isAdvanced()) {
+			$settings['opentools_shippingbyrules_upgrade'] = array(
+				'name' 		=> $this->__( 'Upgrade to the ADVANCED VERSION of the OpenTools Shipping by Rules plugin'),
+				'type' 		=> 'opentools_shippingbyrules_upgrade',
+				'link'		=> 'http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html',
+			);
+		}
+		return $settings;
+	}
+	
+	public function printUpgradeNagBox($settings) {
+		include plugin_dir_path( __FILE__ ) . 'admin/html/html-upgrade-nag.php';
+	}
+	
+
+}
diff --git a/legacy-includes/legacy-rules_shipping_framework_woocommerce_advanced.php b/legacy-includes/legacy-rules_shipping_framework_woocommerce_advanced.php
new file mode 100644
index 0000000000000000000000000000000000000000..5ecda58c6ac052354c92ff0b4fec9363f3ff9874
--- /dev/null
+++ b/legacy-includes/legacy-rules_shipping_framework_woocommerce_advanced.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Shipping by Rules generic helper class (WP/WooCommerce-specific)
+ * Reinhold Kainhofer, Open Tools, office@open-tools.net
+ * @copyright (C) 2012-2016 - Reinhold Kainhofer
+ * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
+**/
+
+if ( !defined( 'ABSPATH' ) ) { 
+	die( 'Direct Access to ' . basename( __FILE__ ) . ' is not allowed.' );
+}
+if (!class_exists('LegacyRulesShippingFrameworkWooCommerce')) {
+	require_once( plugin_dir_path( __FILE__ ) . '/legacy-rules_shipping_framework_woocommerce.php');
+}
+
+class LegacyRulesShippingFrameworkWooCommerceAdvanced extends LegacyRulesShippingFrameworkWooCommerce {
+	
+	static function getHelper() {
+		static $helper = null;
+		if (!$helper) {
+			$helper = new LegacyRulesShippingFrameworkWooCommerceAdvanced();
+			$helper->setup();
+		}
+		return $helper;
+    }
+	function __construct() {
+		parent::__construct();
+	}
+	function isAdvanced() {
+		return true;
+	}
+	protected function getOrderAddress ($cart, $method) {
+		$data = parent::getOrderAddress($cart, $method);
+		$address = $cart['destination'];
+		$zip = isset($address['postcode'])?trim($address['postcode']):'';
+		if (isset($zip) && $zip!='') {
+			$data = array_merge($data, $this->getAddressZIP($zip));
+		}
+		return $data;
+	}
+	
+	protected function createMethodRule ($r, $countries, $ruleinfo) {
+		return new ShippingRule_Advanced($this, $r, $countries, $ruleinfo);
+	}
+	
+	protected function addCustomCartValues ($cart, $products, $method, &$values) {
+		$values['coupons'] = $cart['applied_coupons'];
+		return $values;
+	}
+	
+
+}
diff --git a/legacy-woocommerce-advanced-shipping-by-rules.php b/legacy-woocommerce-advanced-shipping-by-rules.php
new file mode 100644
index 0000000000000000000000000000000000000000..9925eb0195cf72757026d84e43c8cdebf99a6ac3
--- /dev/null
+++ b/legacy-woocommerce-advanced-shipping-by-rules.php
@@ -0,0 +1,139 @@
+<?php
+/**
+ * Copyright (C) 2015 Reinhold Kainhofer
+ *
+ *     This file is part of WooCommerce Shipping By Rules,
+ *     a plugin for WordPress and WooCommerce.
+ *
+ *     WooCommerce Shipping By Rules is free software:
+ *     You can redistribute it and/or modify it under the terms of the
+ *     GNU General Public License as published by the Free Software
+ *     Foundation, either version 3 of the License, or (at your option)
+ *     any later version.
+ *
+ *     This software is distributed in the hope that
+ *     it will be useful, but WITHOUT ANY WARRANTY; without even the
+ *     implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *     PURPOSE. See the GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with WordPress. If not, see <http://www.gnu.org/licenses/>.
+ */
+ 
+ 
+/**
+ * Class Legacy_WooCommerce_Shipping_By_Rules_Advanced.
+ *
+ * Main Shipping by Rules class (legacy version), add filters and handling all other files.
+ *
+ * @class       Legacy_WooCommerce_Shipping_By_Rules_Advanced
+ * @author      Reinhold Kainhofer
+ */
+class Legacy_WooCommerce_Shipping_By_Rules_Advanced {
+	public $version = '1.2.4';
+	private static $instance;
+
+	public function __construct() {
+
+		if ( ! function_exists( 'is_plugin_active_for_network' ) )
+			require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
+
+		// Check if WooCommerce is active
+		if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) :
+			if ( ! is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) :
+				return;
+			endif;
+		endif;
+
+		$this->init();
+
+	}
+
+
+	public static function instance() {
+		if ( is_null( self::$instance ) ) {
+			self::$instance = new self();
+		}
+		return self::$instance;
+	}
+
+	public function init() {
+		$this->hooks();
+		$this->load_textdomain();
+		$this->update();
+
+		if (!class_exists("LegacyRulesShippingFrameworkWooCommerceAdvanced")) {
+			require_once( plugin_dir_path( __FILE__ ) . 'legacy-includes/legacy-rules_shipping_framework_woocommerce_advanced.php');
+		}
+		$this->helper = LegacyRulesShippingFrameworkWooCommerceAdvanced::getHelper();
+		
+		// Shipping method post type definition:
+		if (!class_exists("Legacy_Shipping_Rules_post_type")) {
+			require_once plugin_dir_path( __FILE__ ) . 'legacy-includes/legacy-rules-shipping-post-type.php';
+		}
+		$this->post_type = new Legacy_Shipping_Rules_post_type($this->helper);
+		add_filter( 'plugin_action_links_' . dirname(plugin_basename( __FILE__ )) . '/woocommerce-advanced-shipping-by-rules.php',		array( &$this, 'shippingbyrules_add_settings_link' ) );
+	}
+	
+	/**
+	 * Add settings link to plugins page
+	 */
+	public function shippingbyrules_add_settings_link( $links ) {
+		$link = '<a href="admin.php?page=wc-settings&tab=shipping&section=legacy-shipping_by_rules">'. $this->helper->__( 'Settings (legacy)' ) . '</a>';
+		array_unshift( $links, $link );
+		return $links;
+	}
+	
+
+	public function update() {
+
+		$db_version = get_option( 'shipping_by_rules_plugin_version', $this->version );
+
+		// Stop current version is up to date
+		if ( $db_version >= $this->version ) :
+			return;
+		endif;
+
+		update_option( 'shipping_by_rules_plugin_version', $this->version );
+	}
+
+	public function hooks() {
+		add_action( 'woocommerce_shipping_init', array( $this, 'shipping_by_rules_init' ) );
+		add_action( 'woocommerce_shipping_methods', array( $this, 'shipping_by_rules_add_shipping_method' ) );
+		add_action( 'admin_enqueue_scripts', array( $this, 'shipping_by_rules_admin_enqueue_scripts' ) );
+	}
+
+	public function load_textdomain() {
+		// Load textdomain
+		load_plugin_textdomain('opentools-shippingrules', false, basename( dirname( __FILE__ ) ) . '/languages' );
+	}
+
+	public function shipping_by_rules_init() {
+		if (!class_exists('Legacy_Shipping_by_Rules')) {
+			require_once plugin_dir_path( __FILE__ ) . 'legacy-includes/legacy-rules-shipping-method.php';
+		}
+		$this->rule_shipping_method = new Legacy_Shipping_by_Rules();
+		$this->rule_shipping_method->setHelper($this->helper);
+	}
+
+	public function shipping_by_rules_add_shipping_method( $methods ) {
+		if ( class_exists( 'Legacy_Shipping_by_Rules' ) ) :
+			$methods['legacy-shipping_by_rules'] = 'Legacy_Shipping_by_Rules';
+		endif;
+
+		return $methods;
+	}
+
+	public function shipping_by_rules_admin_enqueue_scripts() {
+		// For some strange reason, WC does not define the select2.css style...
+		$assets_path          = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
+		wp_enqueue_style( 'select2', $assets_path . 'css/select2.css' );
+
+		wp_enqueue_style( 'legacy_shipping_by_rules-style', plugins_url( 'assets/css/legacy-admin-styles.css', __FILE__ ), array('select2'), $this->version );
+		wp_enqueue_style( 'shipping_by_rules-style', plugins_url( 'assets/css/admin-styles.css', __FILE__ ), array('select2'), $this->version );
+		wp_enqueue_script( 'legacy-shipping-by-rules-config', plugins_url( 'assets/js/legacy-shipping-by-rules-config.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable', 'select2', 'wc-enhanced-select' ), $this->version, true );
+	}
+
+}
+
+Legacy_WooCommerce_Shipping_By_Rules_Advanced::instance();
diff --git a/legacy-woocommerce-shipping-by-rules.php b/legacy-woocommerce-shipping-by-rules.php
new file mode 100644
index 0000000000000000000000000000000000000000..49878ff305023bf7d03bc99d8e8d7a76e8a8e5aa
--- /dev/null
+++ b/legacy-woocommerce-shipping-by-rules.php
@@ -0,0 +1,137 @@
+<?php
+/**
+ * Copyright (C) 2016 Reinhold Kainhofer
+ *
+ *     This file is part of WooCommerce Shipping By Rules,
+ *     a plugin for WordPress and WooCommerce.
+ *
+ *     WooCommerce Shipping By Rules is free software:
+ *     You can redistribute it and/or modify it under the terms of the
+ *     GNU General Public License as published by the Free Software
+ *     Foundation, either version 3 of the License, or (at your option)
+ *     any later version.
+ *
+ *     This software is distributed in the hope that
+ *     it will be useful, but WITHOUT ANY WARRANTY; without even the
+ *     implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *     PURPOSE. See the GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with WordPress. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * Class Legacy_WooCommerce_Shipping_By_Rules.
+ *
+ * Main Shipping by Rules class (legacy version), add filters and handling all other files.
+ *
+ * @class       Legacy_WooCommerce_Shipping_By_Rules
+ * @author      Reinhold Kainhofer
+ */
+class Legacy_WooCommerce_Shipping_By_Rules {
+	public $version = '1.2.4';
+	private static $instance;
+
+	public function __construct() {
+		if ( ! function_exists( 'is_plugin_active_for_network' ) )
+			require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
+
+		// Check if WooCommerce is active
+		if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) :
+			if ( ! is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) :
+				return;
+			endif;
+		endif;
+		$this->init();
+	}
+
+	public static function instance() {
+		if ( is_null( self::$instance ) ) {
+			self::$instance = new self();
+		}
+		return self::$instance;
+	}
+
+	public function init() {
+		$this->hooks();
+		$this->load_textdomain();
+		$this->update();
+
+		if (!class_exists("LegacyRulesShippingFrameworkWooCommerce")) {
+			require_once( plugin_dir_path( __FILE__ ) . 'legacy-includes/legacy-rules_shipping_framework_woocommerce.php');
+		}
+		$this->helper = LegacyRulesShippingFrameworkWooCommerce::getHelper();
+		
+		// Shipping method post type definition:
+		if (!class_exists("Legacy_Shipping_Rules_post_type")) {
+			require_once plugin_dir_path( __FILE__ ) . 'legacy-includes/legacy-rules-shipping-post-type.php';
+		}
+		$this->post_type = new Legacy_Shipping_Rules_post_type($this->helper);
+		add_filter( 'plugin_action_links_' . dirname(plugin_basename( __FILE__ )) . '/woocommerce-shipping-by-rules.php',		array( &$this, 'shippingbyrules_add_settings_link' ) );
+	}
+
+	/**
+	 * Add settings link to plugins page
+	 */
+	public function shippingbyrules_add_settings_link( $links ) {
+		$link = '<a href="admin.php?page=wc-settings&tab=shipping&section=legacy-shipping_by_rules">'. $this->helper->__( 'Settings (legacy)' ) . '</a>';
+		array_unshift( $links, $link );
+		return $links;
+	}
+	
+
+	public function update() {
+		$db_version = get_option( 'shipping_by_rules_plugin_version', $this->version );
+		// Stop current version is up to date
+		if ( $db_version >= $this->version ) :
+			return;
+		endif;
+		// Update functions come here:
+		// From version 1.x.x to 1.x.y
+		// From version 1.x.y to 1.x.z
+		update_option( 'shipping_by_rules_plugin_version', $this->version );
+	}
+
+	public function hooks() {
+		add_action( 'woocommerce_shipping_init', array( $this, 'shipping_by_rules_init' ) );
+		add_action( 'woocommerce_shipping_methods', array( $this, 'shipping_by_rules_add_shipping_method' ) );
+		add_action( 'admin_enqueue_scripts', array( $this, 'shipping_by_rules_admin_enqueue_scripts' ) );
+	}
+
+	public function load_textdomain() {
+		load_plugin_textdomain('opentools-shippingrules', false, basename( dirname( __FILE__ ) ) . '/languages' );
+	}
+
+	public function shipping_by_rules_init() {
+		if (!class_exists('Legacy_Shipping_by_Rules')) {
+			require_once plugin_dir_path( __FILE__ ) . 'legacy-includes/legacy-rules-shipping-method.php';
+		}
+		$this->rule_shipping_method = new Legacy_Shipping_by_Rules();
+	}
+
+	public function shipping_by_rules_add_shipping_method( $methods ) {
+		if ( class_exists( 'Legacy_Shipping_by_Rules' ) ) :
+			$methods['legacy-shipping_by_rules'] = 'Legacy_Shipping_by_Rules';
+		endif;
+		// TODO: Figure out a way to add each shipping by rules method as a
+		// separate WooCommerce shipping method (ie. their order can be
+		// defined in the WC configuration and not only in the Shipping by
+		// Rules Method configuration screen.
+		return $methods;
+	}
+
+	public function shipping_by_rules_admin_enqueue_scripts() {
+		// For some strange reason, WC does not define the select2.css style...
+		$assets_path          = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
+		wp_enqueue_style( 'select2', $assets_path . 'css/select2.css' );
+
+		wp_enqueue_style( 'legacy_shipping_by_rules-style', plugins_url( 'assets/css/legacy-admin-styles.css', __FILE__ ), array('select2'), $this->version );
+		wp_enqueue_style( 'shipping_by_rules-style', plugins_url( 'assets/css/admin-styles.css', __FILE__ ), array('select2'), $this->version );
+		wp_enqueue_script( 'legacy-shipping-by-rules-config', plugins_url( 'assets/js/legacy-shipping-by-rules-config.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable', 'select2', 'wc-enhanced-select' ), $this->version, true );
+
+	}
+
+
+}
+
+Legacy_WooCommerce_Shipping_By_Rules::instance();
diff --git a/readme.txt b/readme.txt
index 15f293e765f1a39d4e47a62fb364b406bc032f08..6d2fce48e3ca350c6542dc2921a452fd49ecc653 100644
--- a/readme.txt
+++ b/readme.txt
@@ -71,7 +71,7 @@ Please see our support forum at http://open-tools.net/forum/. It might also be a
 
 = 1.3.0 =
 * Update for full compatibility with WooCommerce 3.0
-* Transition to Shipping zones
+* Convert the plugin to WooCommerce's shipping zones. Old methods will continue to work until they are removed.
 
 = 1.2.8 =
 * Fix issues with UK_* variables when no address is entered yet
diff --git a/woocommerce-advanced-shipping-by-rules.php b/woocommerce-advanced-shipping-by-rules.php
index b669db2ed07a7a39e69436e080a4d8b363df9343..2874e6d0582b075af5d5d25166f7a4aed1f785a5 100644
--- a/woocommerce-advanced-shipping-by-rules.php
+++ b/woocommerce-advanced-shipping-by-rules.php
@@ -146,11 +146,7 @@ class WooCommerce_Shipping_By_Rules_Advanced {
 		$this->helper = RulesShippingFrameworkWooCommerceAdvanced::getHelper();
 		
 		// Shipping method post type definition:
-		if (!class_exists("Shipping_Rules_post_type")) {
-			require_once plugin_dir_path( __FILE__ ) . 'includes/rules-shipping-post-type.php';
-		}
-		$this->post_type = new Shipping_Rules_post_type($this->helper);
-
+// 
 		// Links to docs and config in the plugin page
 		add_filter( 'plugin_row_meta', array( &$this, 'shippingbyrules_row_meta' ), 30, 2 );
 		add_filter( 'plugin_action_links_'.plugin_basename(__FILE__),		array( &$this, 'shippingbyrules_add_settings_link' ) );
@@ -262,10 +258,7 @@ class WooCommerce_Shipping_By_Rules_Advanced {
 		if ( class_exists( 'Shipping_by_Rules' ) ) :
 			$methods['shipping_by_rules'] = 'Shipping_by_Rules';
 		endif;
-		// TODO: Figure out a way to add each shipping by rules method as a
-		// separate WooCommerce shipping method (ie. their order can be
-		// defined in the WC configuration and not only in the Shipping by
-		// Rules Method configuration screen.
+
 		return $methods;
 	}
 
@@ -282,32 +275,19 @@ class WooCommerce_Shipping_By_Rules_Advanced {
 		$assets_path          = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
 		wp_enqueue_style( 'select2', $assets_path . 'css/select2.css' );
 
+		wp_enqueue_style( 'legacy_shipping_by_rules-style', plugins_url( 'assets/css/legacy-admin-styles.css', __FILE__ ), array('select2'), $this->version );
 		wp_enqueue_style( 'shipping_by_rules-style', plugins_url( 'assets/css/admin-styles.css', __FILE__ ), array('select2'), $this->version );
-		wp_enqueue_script( 'shipping-by-rules-config', plugins_url( 'assets/js/shipping-by-rules-config.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable', 'select2', 'wc-enhanced-select' ), $this->version, true );
+		wp_enqueue_script( 'legacy-shipping-by-rules-config', plugins_url( 'assets/js/legacy-shipping-by-rules-config.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable', 'select2', 'wc-enhanced-select' ), $this->version, true );
 
 	}
 
 
 }
 
+WooCommerce_Shipping_By_Rules_Advanced::instance();
 
-/**
- * The main function responsible for returning the WooCommerce_Shipping_By_Rules_Advanced object.
- *
- * Use this function like you would a global variable, except without needing to declare the global.
- *
- * Example: <?php OpenTools_ShippingByRules()->method_name(); ?>
- *
- * @since 1.0.0
- *
- * @return object WooCommerce_Shipping_By_Rules_Advanced class object.
- */
-if ( ! function_exists( 'OpenTools_ShippingByRules_Advanced' ) ) :
-
- 	function OpenTools_ShippingByRules_Advanced() {
-		return WooCommerce_Shipping_By_Rules_Advanced::instance();
-	}
-
-endif;
-
-OpenTools_ShippingByRules_Advanced();
+// Load the legacy plugin version IF REQUIRED!
+$legacymethods = get_posts (array ('posts_per_page' => '-1', 'post_type' => 'shipping_rules'));
+// if (count($legacymethods)>0) {
+	require_once( plugin_dir_path( __FILE__ ) . 'legacy-woocommerce-advanced-shipping-by-rules.php');
+// }
diff --git a/woocommerce-shipping-by-rules.php b/woocommerce-shipping-by-rules.php
index d1f94729d489a14fac81deaa40329cfcfc5f9b4b..99ab81febaf8918c01ad45f6a84319ece9d00561 100644
--- a/woocommerce-shipping-by-rules.php
+++ b/woocommerce-shipping-by-rules.php
@@ -118,10 +118,11 @@ class WooCommerce_Shipping_By_Rules {
 		$this->helper = RulesShippingFrameworkWooCommerce::getHelper();
 		
 		// Shipping method post type definition:
-		if (!class_exists("Shipping_Rules_post_type")) {
-			require_once plugin_dir_path( __FILE__ ) . 'includes/rules-shipping-post-type.php';
-		}
-		$this->post_type = new Shipping_Rules_post_type($this->helper);
+		// TODO: Legacy
+// 		if (!class_exists("Shipping_Rules_post_type")) {
+// // 			require_once plugin_dir_path( __FILE__ ) . 'includes/rules-shipping-post-type.php';
+// 		}
+// 		$this->post_type = new Shipping_Rules_post_type($this->helper);
 
 		// Links to docs and config in the plugin page
 		add_filter( 'plugin_row_meta', array( &$this, 'shippingbyrules_row_meta' ), 30, 2 );
@@ -279,32 +280,19 @@ class WooCommerce_Shipping_By_Rules {
 		$assets_path          = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
 		wp_enqueue_style( 'select2', $assets_path . 'css/select2.css' );
 
+		wp_enqueue_style( 'legacy_shipping_by_rules-style', plugins_url( 'assets/css/legacy-admin-styles.css', __FILE__ ), array('select2'), $this->version );
 		wp_enqueue_style( 'shipping_by_rules-style', plugins_url( 'assets/css/admin-styles.css', __FILE__ ), array('select2'), $this->version );
-		wp_enqueue_script( 'shipping-by-rules-config', plugins_url( 'assets/js/shipping-by-rules-config.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable', 'select2', 'wc-enhanced-select' ), $this->version, true );
+		wp_enqueue_script( 'legacy-shipping-by-rules-config', plugins_url( 'assets/js/legacy-shipping-by-rules-config.js', __FILE__ ), array( 'jquery', 'jquery-ui-sortable', 'select2', 'wc-enhanced-select' ), $this->version, true );
 
 	}
 
 
 }
 
+WooCommerce_Shipping_By_Rules::instance();
 
-/**
- * The main function responsible for returning the WooCommerce_Shipping_By_Rules object.
- *
- * Use this function like you would a global variable, except without needing to declare the global.
- *
- * Example: <?php OpenTools_ShippingByRules()->method_name(); ?>
- *
- * @since 1.0.0
- *
- * @return object WooCommerce_Shipping_By_Rules class object.
- */
-if ( ! function_exists( 'OpenTools_ShippingByRules' ) ) :
-
- 	function OpenTools_ShippingByRules() {
-		return WooCommerce_Shipping_By_Rules::instance();
-	}
-
-endif;
-
-OpenTools_ShippingByRules();
+// Load the legacy plugin version IF REQUIRED!
+$legacymethods = get_posts (array ('posts_per_page' => '-1', 'post_type' => 'shipping_rules'));
+if (count($legacymethods)>0) {
+	require_once( plugin_dir_path( __FILE__ ) . 'legacy-woocommerce-shipping-by-rules.php');
+}