woocommerce_payment_gateways хук-фильтрWC 1.0

Filter.

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

add_filter( 'woocommerce_payment_gateways', 'wp_kama_woocommerce_payment_gateways_filter' );

/**
 * Function for `woocommerce_payment_gateways` filter-hook.
 * 
 * @param  $load_gateways 
 *
 * @return 
 */
function wp_kama_woocommerce_payment_gateways_filter( $load_gateways ){

	// filter...
	return $load_gateways;
}
$load_gateways
-

Где вызывается хук

WC_Payment_Gateways::init()
woocommerce_payment_gateways
woocommerce/includes/class-wc-payment-gateways.php 88
$load_gateways = apply_filters( 'woocommerce_payment_gateways', $load_gateways );

Где используется хук в WooCommerce

woocommerce/src/Internal/Admin/WCPayPromotion/Init.php 32
add_filter( 'woocommerce_payment_gateways', array( __CLASS__, 'possibly_register_pre_install_wc_pay_promotion_gateway' ) );