Skip to content

Commit 144c8c8

Browse files
committed
Release 1.3.0 && Fix lint issues
1 parent f4b2a50 commit 144c8c8

File tree

7 files changed

+388
-379
lines changed

7 files changed

+388
-379
lines changed

admin/partials/class-repack-telemetry.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,9 @@ public function admin_notice() {
125125
</p>
126126
<div class="toggle-hidden hidden">
127127
<?php
128-
ob_start();
129-
$template_loader
130-
->set_template_data( $data )
131-
->get_template_part( 'telemetry-data' );
132-
133-
echo ob_get_clean();
128+
$template_loader
129+
->set_template_data( $data )
130+
->get_template_part( 'telemetry-data' );
134131
?>
135132
</div>
136133
<p class="actions">
@@ -163,14 +160,14 @@ public function get_data( $data = array() ) {
163160
return wp_parse_args(
164161
$data,
165162
array(
166-
'siteURL' => home_url( '/' ),
167-
'siteLang' => get_locale(),
168-
'repackStart' => get_option( 'repack_start' ),
169-
'repackCounter' => get_option( 'repack_counter' ),
170-
'repackRatio' => $this->get_repack_ratio( get_option( 'repack_counter' ) ),
171-
'repackCoupon' => Repack_Public::repack_coupon_exists(),
172-
'repackCouponCode' => Repack_Public::get_repack_coupon_name(),
173-
'repackLastSent' => get_option( 'repack_telemetry_sent' ),
163+
'site_url' => home_url( '/' ),
164+
'site_lang' => get_locale(),
165+
'repack_start' => get_option( 'repack_start' ),
166+
'repack_counter' => get_option( 'repack_counter' ),
167+
'repack_ratio' => $this->get_repack_ratio( get_option( 'repack_counter' ) ),
168+
'repack_coupon' => Repack_Public::repack_coupon_exists(),
169+
'repack_coupon_code' => Repack_Public::get_repack_coupon_name(),
170+
'repackLastSent' => get_option( 'repack_telemetry_sent' ),
174171
)
175172
);
176173
}
@@ -198,7 +195,7 @@ private function get_repack_ratio( $consents ) {
198195
)
199196
);
200197

201-
if ( $consents === 0 || $orders->found_posts === 0 ) {
198+
if ( 0 === $consents || 0 === $orders->found_posts ) {
202199
return '0';
203200
}
204201

0 commit comments

Comments
 (0)