Automattic\WooCommerce\Internal\Admin\Settings

PaymentsProviders::get_payment_gateway_plugin_file │ public │ WC 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.

Метод класса: PaymentsProviders{}

Хуков нет.

Возвращает

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

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

$PaymentsProviders = new PaymentsProviders();
$PaymentsProviders->get_payment_gateway_plugin_file( $payment_gateway, $plugin_slug ): string;
$payment_gateway(WC_Payment_Gateway) (обязательный)
The payment gateway object.
$plugin_slug(строка)
The payment gateway plugin slug to use directly.
По умолчанию: ''

Код PaymentsProviders::get_payment_gateway_plugin_file() WC 11.3.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 );
}