WC_Settings_Payment_Gateways::output()
Output the settings.
Метод класса: WC_Settings_Payment_Gateways{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Settings_Payment_Gateways = new WC_Settings_Payment_Gateways(); $WC_Settings_Payment_Gateways->output();
Код WC_Settings_Payment_Gateways::output() WC Settings Payment Gateways::output WC 9.8.2
public function output() { //phpcs:disable WordPress.Security.NonceVerification.Recommended global $current_section; // Load gateways so we can show any global options they may have. $payment_gateways = WC()->payment_gateways->payment_gateways(); if ( $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'] ) ) { $enabled = $gateway->get_option( 'enabled' ); if ( $enabled ) { $gateway->settings['enabled'] = wc_string_to_bool( $enabled ) ? 'no' : 'yes'; } } $this->run_gateway_admin_options( $gateway ); break; } } } parent::output(); //phpcs:enable }