Only show settings link if method has_settings

This commit is contained in:
Mike Jolley 2014-02-20 15:16:53 +00:00 committed by Coen Jacobs
parent 2b05f508d7
commit 465b9b9d5f
1 changed files with 7 additions and 3 deletions

View File

@ -237,9 +237,13 @@ class WC_Settings_Shipping extends WC_Settings_Page {
echo '-';
echo '</td>
<td class="settings">
<a class="button" href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section=' . strtolower( get_class( $method ) ) ) . '">' . __( 'Settings', 'woocommerce' ) . '</a>
</td>
<td class="settings">';
if ( $method->has_settings ) {
echo '<a class="button" href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section=' . strtolower( get_class( $method ) ) ) . '">' . __( 'Settings', 'woocommerce' ) . '</a>';
}
echo '</td>
</tr>';
}
?>