Skip to content

Commit 9d37ef7

Browse files
committed
Fixed: Uncaught Error: Call to a member function enable_custom_property() on bool if no token was entered.
1 parent 72ad257 commit 9d37ef7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Admin/Upgrades.php

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use Exception;
1313
use Plausible\Analytics\WP\Admin\Provisioning\Integrations;
14+
use Plausible\Analytics\WP\Client;
1415
use Plausible\Analytics\WP\Helpers;
1516

1617
/**
@@ -292,6 +293,11 @@ public function upgrade_to_230() {
292293
$edd_provisioning = new Provisioning\Integrations\EDD( new Integrations() );
293294
$provisioning = new Provisioning();
294295

296+
// No token entered.
297+
if ( ! $provisioning->client instanceof Client ) {
298+
return;
299+
}
300+
295301
$provisioning->maybe_create_custom_properties( [], $settings );
296302
$edd_provisioning->maybe_create_edd_funnel( [], $settings );
297303
}

0 commit comments

Comments
 (0)