Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders
WCCore::get_plugin_details
Get the plugin details for a WC core-provided payment gateway.
Method of the class: WCCore{}
No Hooks.
Returns
Array. The plugin details for the payment gateway.
Usage
$WCCore = new WCCore(); $WCCore->get_plugin_details( $payment_gateway ): array;
- $payment_gateway(WC_Payment_Gateway) (required)
- The payment gateway object.
WCCore::get_plugin_details() WCCore::get plugin details code WC 10.5.0
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;
}