Merge pull request #22704 from woocommerce/fix/22696

Custom payment sections not loading fields due to logic error.
This commit is contained in:
Mike Jolley 2019-02-13 14:22:39 +00:00 committed by GitHub
commit 2abf39c6ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,8 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
if ( '' === $current_section ) {
$settings = apply_filters(
'woocommerce_payment_gateways_settings', array(
'woocommerce_payment_gateways_settings',
array(
array(
'title' => __( 'Payment methods', 'woocommerce' ),
'desc' => __( 'Installed payment methods are listed below and can be sorted to control their display order on the frontend.', 'woocommerce' ),
@ -94,10 +95,9 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
break;
}
}
} else {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields( $settings );
}
$settings = $this->get_settings( $current_section );
WC_Admin_Settings::output_fields( $settings );
}
/**