Automattic\WooCommerce\Internal\Admin\Settings
PaymentProviders::get_payment_gateway_plugin_file()
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.
Метод класса: PaymentProviders{}
Хуков нет.
Возвращает
Строку
. The plugin file corresponding to the payment gateway plugin. Does not include the .php extension.
Использование
$PaymentProviders = new PaymentProviders(); $PaymentProviders->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.
По умолчанию: ''
Код PaymentProviders::get_payment_gateway_plugin_file() PaymentProviders::get payment gateway plugin file WC 9.6.1
public function get_payment_gateway_plugin_file( WC_Payment_Gateway $payment_gateway, string $plugin_slug = '' ): string { $provider = $this->get_gateway_provider_instance( $payment_gateway->id ); return $provider->get_plugin_file( $payment_gateway, $plugin_slug ); }