Fix instance link in zones screen

This commit is contained in:
Mike Jolley 2016-08-02 11:24:31 +01:00
parent 0f94c3eebd
commit 0fbb38c034
2 changed files with 3 additions and 3 deletions

View File

@ -213,14 +213,14 @@
return parseInt( method.method_order, 10 ); return parseInt( method.method_order, 10 );
} ); } );
_.each( shipping_methods, function( shipping_method, instance_id ) { _.each( shipping_methods, function( shipping_method ) {
var class_name = 'method_disabled'; var class_name = 'method_disabled';
if ( 'yes' === shipping_method.enabled ) { if ( 'yes' === shipping_method.enabled ) {
class_name = 'method_enabled'; class_name = 'method_enabled';
} }
$method_list.append( '<li class="wc-shipping-zone-method"><a href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id=' + instance_id + '" class="' + class_name + '">' + shipping_method.title + '</a></li>' ); $method_list.append( '<li class="wc-shipping-zone-method"><a href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id=' + shipping_method.instance_id + '" class="' + class_name + '">' + shipping_method.title + '</a></li>' );
} ); } );
} else { } else {
$method_list.append( '<li class="wc-shipping-zone-method">' + data.strings.no_shipping_methods_offered + '</li>' ); $method_list.append( '<li class="wc-shipping-zone-method">' + data.strings.no_shipping_methods_offered + '</li>' );

File diff suppressed because one or more lines are too long