Skip to content

Commit b10c68d

Browse files
committed
chore: using Appsero/Client as composer library instead of loading from libs/
1 parent a367690 commit b10c68d

File tree

8 files changed

+5431
-5788
lines changed

8 files changed

+5431
-5788
lines changed

composer.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@
1212
"minimum-stability": "dev",
1313
"require": {
1414
"php": ">=7.0",
15-
"composer/installers": "^1.9"
15+
"composer/installers": "^1.9",
16+
"appsero/client": "dev-develop"
1617
},
1718

1819
"require-dev": {
19-
"automattic/vipwpcs": "dev-master",
20+
"automattic/vipwpcs": "^2.3",
2021
"dealerdirect/phpcodesniffer-composer-installer": "^0.7"
2122
},
2223
"scripts": {
2324
"phpcs": [
2425
"phpcs -p -s"
2526
]
26-
}
27+
},
28+
"config": {
29+
"allow-plugins": {
30+
"composer/installers": true,
31+
"dealerdirect/phpcodesniffer-composer-installer": true
32+
}
33+
}
2734
}

composer.lock

Lines changed: 87 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conversion-tracking.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class WeDevs_WC_Conversion_Tracking {
7070
* within our plugin.
7171
*/
7272
public function __construct() {
73+
require_once __DIR__ . '/vendor/autoload.php';
74+
7375
$this->define_constants();
7476
$this->init_hooks();
7577
$this->includes();
@@ -241,10 +243,6 @@ public function plugin_upgrades() {
241243
* @return void
242244
*/
243245
public function init_tracker() {
244-
if ( ! class_exists( 'Appsero\Client' ) ) {
245-
require_once __DIR__ . '/lib/appsero/Client.php';
246-
}
247-
248246
$client = new Appsero\Client(
249247
'6816029d-7d48-4ed3-8ae4-aeb6a9496f21',
250248
'WooCommerce Conversion Tracking',

0 commit comments

Comments
 (0)