WC_Settings_Payment_Gateways::output()
Output the settings.
Method of the class: WC_Settings_Payment_Gateways{}
No Hooks.
Return
null
. Nothing.
Usage
$WC_Settings_Payment_Gateways = new WC_Settings_Payment_Gateways(); $WC_Settings_Payment_Gateways->output();
WC_Settings_Payment_Gateways::output() WC Settings Payment Gateways::output code WC 7.5.1
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 }