Skip to content

Commit f6d85df

Browse files
committed
Update setUserAgent to include comment
1 parent c1d8f31 commit f6d85df

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Services/sdk/MoneiSdkClientFactory.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ public function __construct( ApiKeyService $apiKeyService ) {
2121
public function get_client() {
2222
if ( $this->client === null ) {
2323
include_once WC_Monei()->plugin_path() . '/vendor/autoload.php';
24-
$config = Configuration::getDefaultConfiguration();
24+
$config = Configuration::getDefaultConfiguration();
2525
$this->client = new MoneiClient( $this->apiKeyService->get_api_key(), $config );
26-
$this->client->setUserAgent( 'MONEI/WooCommerce/'. WC_Monei()->version );
27-
}
26+
$this->client->setUserAgent(
27+
'MONEI/WooCommerce/' . WC_Monei()->version .
28+
' (WordPress v' . get_bloginfo( 'version' ) .
29+
'; Woo v' . WC()->version .
30+
'; PHP v' . phpversion() . ')'
31+
); }
2832
return $this->client;
2933
}
3034
}

0 commit comments

Comments
 (0)