WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Payment_Gateways::init() public WC 1.0

Load gateways and hook in functions.

Это метод класса: WC_Payment_Gateways{}

Хуки из метода
Возвращает

Null. Ничего.

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

$WC_Payment_Gateways = new WC_Payment_Gateways();
$WC_Payment_Gateways->init();

Код WC_Payment_Gateways::init() WC 4.5.2

woocommerce/includes/class-wc-payment-gateways.php
<?php
public function init() {
	$load_gateways = array(
		'WC_Gateway_BACS',
		'WC_Gateway_Cheque',
		'WC_Gateway_COD',
		'WC_Gateway_Paypal',
	);

	// Filter.
	$load_gateways = apply_filters( 'woocommerce_payment_gateways', $load_gateways );

	// Get sort order option.
	$ordering  = (array) get_option( 'woocommerce_gateway_order' );
	$order_end = 999;

	// Load gateways in order.
	foreach ( $load_gateways as $gateway ) {
		if ( is_string( $gateway ) && class_exists( $gateway ) ) {
			$gateway = new $gateway();
		}

		// Gateways need to be valid and extend WC_Payment_Gateway.
		if ( ! is_a( $gateway, 'WC_Payment_Gateway' ) ) {
			continue;
		}

		if ( isset( $ordering[ $gateway->id ] ) && is_numeric( $ordering[ $gateway->id ] ) ) {
			// Add in position.
			$this->payment_gateways[ $ordering[ $gateway->id ] ] = $gateway;
		} else {
			// Add to end of the array.
			$this->payment_gateways[ $order_end ] = $gateway;
			$order_end++;
		}
	}

	ksort( $this->payment_gateways );
}