API
8 months ago
mu-plugin
5 months ago
class-consent-manager.php
8 months ago
class-features.php
5 months ago
class-my-account.php
8 months ago
class-pixel-builder.php
5 months ago
class-universal.php
3 weeks ago
class-wc-analytics-tracking.php
3 weeks ago
class-woo-analytics-trait.php
3 weeks ago
class-woocommerce-analytics.php
3 weeks ago
class-features.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Features class for WooCommerce Analytics. |
| 4 | * |
| 5 | * @package automattic/woocommerce-analytics |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Woocommerce_Analytics; |
| 9 | |
| 10 | /** |
| 11 | * Features class for WooCommerce Analytics. |
| 12 | */ |
| 13 | class Features { |
| 14 | |
| 15 | /** |
| 16 | * Check if proxy tracking is enabled. |
| 17 | * |
| 18 | * @return bool |
| 19 | */ |
| 20 | public static function is_proxy_tracking_enabled() { |
| 21 | /** |
| 22 | * Filter to enable/disable experimental proxy tracking for WooCommerce Analytics |
| 23 | * |
| 24 | * @since 0.9.0 |
| 25 | * |
| 26 | * @param bool $enabled Whether proxy tracking is enabled. Default false. |
| 27 | */ |
| 28 | return apply_filters( 'woocommerce_analytics_experimental_proxy_tracking_enabled', false ); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Check if ClickHouse is enabled. |
| 33 | * |
| 34 | * @return bool |
| 35 | */ |
| 36 | public static function is_clickhouse_enabled() { |
| 37 | /** |
| 38 | * Filter to enable/disable ClickHouse event tracking. |
| 39 | * |
| 40 | * @module woocommerce-analytics |
| 41 | * |
| 42 | * @since 0.5.0 |
| 43 | * |
| 44 | * @param bool $enabled Whether ClickHouse event tracking is enabled. |
| 45 | */ |
| 46 | return apply_filters( 'woocommerce_analytics_clickhouse_enabled', false ); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Check if auto-installation of the proxy speed module MU-plugin is enabled. |
| 51 | * |
| 52 | * @return bool |
| 53 | */ |
| 54 | public static function is_proxy_speed_module_enabled() { |
| 55 | /** |
| 56 | * Filter to control auto-installation of the proxy speed module mu-plugin. |
| 57 | * |
| 58 | * When this filter returns false, the mu-plugin file can't be added automatically. |
| 59 | * |
| 60 | * @since 0.15.0 |
| 61 | * |
| 62 | * @param bool $auto_install Whether to auto-install the mu-plugin. Default false. |
| 63 | */ |
| 64 | return apply_filters( 'woocommerce_analytics_auto_install_proxy_speed_module', false ); |
| 65 | } |
| 66 | } |
| 67 |