Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders

Komoju::get_settings_url │ public │ WC 1.0

Get the settings URL for a payment gateway.

Method of the class: Komoju{}

No Hooks.

Returns

string. The settings URL for the payment gateway.

Usage

$Komoju = new Komoju();
$Komoju->get_settings_url( $payment_gateway ): string;
$payment_gateway(WC_Payment_Gateway) (required)
The payment gateway object.

Komoju::get_settings_url() code WC 11.1.2

public function get_settings_url( WC_Payment_Gateway $payment_gateway ): string {
	// The legacy combined gateway has no settings section of its own; account connection
	// and payment method selection happen on KOMOJU's dedicated settings tab instead.
	// Per-method gateways (`komoju_*`) already have a real settings section, so defer to
	// the generic gateway settings URL logic for those.
	if ( 'komoju' !== $payment_gateway->id ) {
		return parent::get_settings_url( $payment_gateway );
	}

	return add_query_arg(
		array(
			'from' => Payments::FROM_PAYMENTS_SETTINGS,
		),
		admin_url( 'admin.php?page=wc-settings&tab=komoju_settings' )
	);
}