WC_Settings_Payment_Gateways_React::render_classic_gateway_settings_page()privateWC 1.0

Render the classic gateway settings page.

Метод класса: WC_Settings_Payment_Gateways_React{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->render_classic_gateway_settings_page( $payment_gateways, $current_section );
$payment_gateways(массив) (обязательный)
The payment gateways.
$current_section(строка) (обязательный)
The current section.

Код WC_Settings_Payment_Gateways_React::render_classic_gateway_settings_page() WC 9.4.2

private function render_classic_gateway_settings_page( $payment_gateways, $current_section ) {
	foreach ( $payment_gateways as $gateway ) {
		if ( in_array( $current_section, array( $gateway->id, sanitize_title( get_class( $gateway ) ) ), true ) ) {
			if ( isset( $_GET['toggle_enabled'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
				$enabled = $gateway->get_option( 'enabled' );

				if ( $enabled ) {
					$gateway->settings['enabled'] = wc_string_to_bool( $enabled ) ? 'no' : 'yes';
				}
			}
			$this->run_gateway_admin_options( $gateway );
			break;
		}
	}
}