Skip to content

Commit a23d91c

Browse files
committed
Set user agent in client after instantiation
1 parent 6485670 commit a23d91c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Services/sdk/MoneiSdkClientFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public function get_client() {
2222
if ( $this->client === null ) {
2323
include_once WC_Monei()->plugin_path() . '/vendor/autoload.php';
2424
$config = Configuration::getDefaultConfiguration();
25-
$config->setUserAgent( 'MONEI/WooCommerce/' . WC_Monei()->version );
2625
$this->client = new MoneiClient( $this->apiKeyService->get_api_key(), $config );
26+
$this->client->setUserAgent( 'MONEI/WooCommerce/'. WC_Monei()->version );
2727
}
2828
return $this->client;
2929
}

0 commit comments

Comments
 (0)