Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders

WCCore::get_plugin_detailspublicWC 1.0

Get the plugin details for a WC core-provided payment gateway.

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

Хуков нет.

Возвращает

Массив. The plugin details for the payment gateway.

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

$WCCore = new WCCore();
$WCCore->get_plugin_details( $payment_gateway ): array;
$payment_gateway(WC_Payment_Gateway) (обязательный)
The payment gateway object.

Код WCCore::get_plugin_details() WC 11.0.1

public function get_plugin_details( WC_Payment_Gateway $payment_gateway ): array {
	$plugin_details = parent::get_plugin_details( $payment_gateway );

	// Since these are core-provided gateways, we need to make sure that the provider (WC) can't be deactivated.
	// The way to do this is to NOT provide a plugin file path.
	$plugin_details['file'] = '';

	return $plugin_details;
}