Skip to content
This repository was archived by the owner on Sep 1, 2021. It is now read-only.

Commit 0dd8e7c

Browse files
committed
Bugfix: Make sure plugin doesn't run and warn user that commerce isn't installed.
1 parent 2cbd824 commit 0dd8e7c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

FbPixelPlugin.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public function init()
77
{
88
if (
99
craft()->config->get('noop', 'fbpixel') ||
10+
empty(craft()->plugins->getPlugin('commerce')) ||
1011
empty($this->getPixelId())
1112
) {
1213
return;
@@ -32,7 +33,7 @@ public function getDocumentationUrl()
3233

3334
public function getVersion()
3435
{
35-
return '0.0.4';
36+
return '0.0.5';
3637
}
3738

3839
public function getDeveloper()
@@ -50,6 +51,10 @@ public function getCpAlerts($path, $fetch)
5051
if (empty($this->getPixelId())) {
5152
return ["Enter your pixel id <a href='{$this->getSettingsUrl()}'>here</a> for fbpixel to work."];
5253
}
54+
55+
if (empty(craft()->plugins->getPlugin('commerce'))) {
56+
return ['Craft Commerce is required for fbpixel to work.'];
57+
}
5358
}
5459

5560
public function getSettingsHtml()

releases.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[
22
{
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"downloadUrl": "https://github.com/moment-inc/craft-fbpixel/archive/master.zip",
55
"date": "2017-08-11T11:00:00-12:00",
66
"notes": [
7+
"[Fixed] Make sure plugin doesn't run and warn user that commerce isn't installed.",
78
"[Fixed] It should only run migrations when the Schema version is updated now"
89
]
910
}

0 commit comments

Comments
 (0)