Skip to content
Snippets Groups Projects
Verified Commit 35162802 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: initialize usage tracker


Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 24114b93
No related branches found
No related tags found
1 merge request!6feat: initialize usage tracker
Pipeline #340872 passed with stages
in 50 seconds
## [Unreleased]
### Changed
- Usage tracker is initialized by the library after all plugin's hookables are registered.
## [1.1.0] - 2022-11-23 ## [1.1.0] - 2022-11-23
### Added ### Added
- Compatibility with WooCommerce High-Performance Order Storage (HPOS) - Compatibility with WooCommerce High-Performance Order Storage (HPOS)
......
...@@ -52,6 +52,9 @@ class SimpleFreeStrategy implements InitializationStrategy { ...@@ -52,6 +52,9 @@ class SimpleFreeStrategy implements InitializationStrategy {
$this->store_plugin( $this->plugin ); $this->store_plugin( $this->plugin );
$this->init_plugin( $this->plugin ); $this->init_plugin( $this->plugin );
// Flush usage tracker late, to remain backward compatible with plugins which could instantiate
// the tracker on their own through `wpdesk_tracker_instance` filter.
$this->get_tracker_instance();
return $this->plugin; return $this->plugin;
} }
......
...@@ -65,6 +65,9 @@ class SimplePaidStrategy implements InitializationStrategy { ...@@ -65,6 +65,9 @@ class SimplePaidStrategy implements InitializationStrategy {
} }
$this->store_plugin( $this->plugin ); $this->store_plugin( $this->plugin );
$this->init_plugin( $this->plugin ); $this->init_plugin( $this->plugin );
// Flush usage tracker late, to remain backward compatible with plugins which could instantiate
// the tracker on their own through `wpdesk_tracker_instance` filter.
$this->get_tracker_instance();
}, $priority_before_flow_2_5_after_2_6 = -45); }, $priority_before_flow_2_5_after_2_6 = -45);
return $this->plugin; return $this->plugin;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment