Skip to content

Commit 999eab3

Browse files
committed
Improved: is_wc_active and is_edd_active methods did too much.
1 parent df661b9 commit 999eab3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Integrations.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public function __construct() {
2727
*/
2828
private function init() {
2929
// WooCommerce
30-
if ( self::is_wc_active() ) {
30+
if ( self::is_wc_active() && Helpers::is_enhanced_measurement_enabled( 'revenue' ) ) {
3131
new Integrations\WooCommerce();
3232
}
3333

3434
// Easy Digital Downloads
35-
if ( self::is_edd_active() ) {
35+
if ( self::is_edd_active() && Helpers::is_enhanced_measurement_enabled( 'revenue' ) ) {
3636
new Integrations\EDD();
3737
}
3838

@@ -47,15 +47,15 @@ private function init() {
4747
* @return bool
4848
*/
4949
public static function is_wc_active() {
50-
return apply_filters( 'plausible_analytics_integrations_woocommerce', function_exists( 'WC' ) && Helpers::is_enhanced_measurement_enabled( 'revenue' ) );
50+
return apply_filters( 'plausible_analytics_integrations_woocommerce', function_exists( 'WC' ) );
5151
}
5252

5353
/**
5454
* Checks if Easy Digital Downloads is installed and activated.
5555
* @return bool
5656
*/
5757
public static function is_edd_active() {
58-
return apply_filters( 'plausible_analytics_integrations_edd', function_exists( 'EDD' ) && Helpers::is_enhanced_measurement_enabled( 'revenue' ) );
58+
return apply_filters( 'plausible_analytics_integrations_edd', function_exists( 'EDD' ) );
5959
}
6060

6161
/**

0 commit comments

Comments
 (0)