WC_Settings_Payment_Gateways_React::render_classic_gateway_settings_page()
Render the classic gateway settings page.
Method of the class: WC_Settings_Payment_Gateways_React{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->render_classic_gateway_settings_page( $payment_gateways, $current_section );
- $payment_gateways(array) (required)
- The payment gateways.
- $current_section(string) (required)
- The current section.
WC_Settings_Payment_Gateways_React::render_classic_gateway_settings_page() WC Settings Payment Gateways React::render classic gateway settings page code WC 9.5.1
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; } } }