We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 823971e + f6cbdfa commit 1f18640Copy full SHA for 1f18640
src/class-plugin.php
@@ -156,7 +156,10 @@ public function update_tracked_options() {
156
// Retrieve the existing option_optimizer data.
157
$option_optimizer = get_option( 'option_optimizer', [ 'used_options' => [] ] );
158
159
- $option_optimizer['used_options'] = $this->accessed_options;
+ foreach ( $this->accessed_options as $option => $count ) {
160
+ $option_optimizer['used_options'][ $option ] =
161
+ ( $option_optimizer['used_options'][ $option ] ?? 0 ) + $count;
162
+ }
163
164
if ( $this->should_reset ) {
165
$option_optimizer['used_options'] = [];
0 commit comments