Automattic\WooCommerce\Internal\Admin\Settings

PaymentsProviders::get_payment_gateway_plugin_filepublicWC 1.0

Get the plugin file of payment gateway, without the .php extension.

This is useful for the WP API, which expects the plugin file without the .php extension.

Method of the class: PaymentsProviders{}

No Hooks.

Returns

String. The plugin file corresponding to the payment gateway plugin. Does not include the .php extension.

Usage

$PaymentsProviders = new PaymentsProviders();
$PaymentsProviders->get_payment_gateway_plugin_file( $payment_gateway, $plugin_slug ): string;
$payment_gateway(WC_Payment_Gateway) (required)
The payment gateway object.
$plugin_slug(string)
The payment gateway plugin slug to use directly.
Default: ''

PaymentsProviders::get_payment_gateway_plugin_file() code WC 10.7.0

public function get_payment_gateway_plugin_file( WC_Payment_Gateway $payment_gateway, string $plugin_slug = '' ): string {
	$provider = $this->get_payment_gateway_provider_instance( $payment_gateway->id );

	return $provider->get_plugin_file( $payment_gateway, $plugin_slug );
}