Automattic\WooCommerce\Internal\Admin\Settings

PaymentProviders::get_payment_gateway_plugin_slugpublicWC 1.0

Get the source plugin slug of a payment gateway instance.

Method of the class: PaymentProviders{}

No Hooks.

Returns

String. The plugin slug of the payment gateway. Empty string if a plugin slug could not be determined.

Usage

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

PaymentProviders::get_payment_gateway_plugin_slug() code WC 9.9.4

public function get_payment_gateway_plugin_slug( WC_Payment_Gateway $payment_gateway ): string {
	$provider = $this->get_payment_gateway_provider_instance( $payment_gateway->id );

	return $provider->get_plugin_slug( $payment_gateway );
}