Only show integrations subnav when there are multiple integrations.

This commit is contained in:
Mike Jolley 2014-10-16 15:53:09 +01:00
parent 05d5849a67
commit 1af90cd169
1 changed files with 5 additions and 3 deletions

View File

@ -51,10 +51,12 @@ class WC_Settings_Integrations extends WC_Settings_Page {
$current_section = current( $integrations )->id;
}
foreach ( $integrations as $integration ) {
$title = empty( $integration->method_title ) ? ucfirst( $integration->id ) : $integration->method_title;
if ( sizeof( $integrations ) > 1 ) {
foreach ( $integrations as $integration ) {
$title = empty( $integration->method_title ) ? ucfirst( $integration->id ) : $integration->method_title;
$sections[ strtolower( $integration->id ) ] = esc_html( $title );
$sections[ strtolower( $integration->id ) ] = esc_html( $title );
}
}
return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections );