Skip to content
Snippets Groups Projects
Commit 8826da3e authored by Dyszczo's avatar Dyszczo
Browse files

Merge branch 'bugfix/fatal-wc' into 'master'

WooCommerceCapture checks if WC exists before proceeding

See merge request !14
parents e16ede88 3321d392
No related branches found
No related tags found
1 merge request!14WooCommerceCapture checks if WC exists before proceeding
Pipeline #7101 failed
## [1.6.1] - 2020-05-25
### Fixed
- WooCommerceCapture checks if WC exists before proceeding
## [1.6.0] - 2019-05-21 ## [1.6.0] - 2019-05-21
### Added ### Added
- wpdesk_is_wp_log_capture_permitted filter to disable log capture - wpdesk_is_wp_log_capture_permitted filter to disable log capture
......
...@@ -81,7 +81,8 @@ class WooCommerceCapture ...@@ -81,7 +81,8 @@ class WooCommerceCapture
*/ */
public static function isSupportedWCVersion() public static function isSupportedWCVersion()
{ {
return version_compare(\WooCommerce::instance()->version, self::SUPPORTED_WC_VERSION, '>='); return class_exists(\WooCommerce::class) && version_compare(\WooCommerce::instance()->version,
self::SUPPORTED_WC_VERSION, '>=');
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment