PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / 3.3.3
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar v3.3.3
3.3.3 3.3.2 3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 All 158 releases
← All changes | includes/Extensions/EDD/EDD.php +11 -6 3.2.11 → 3.3.3 View file →
@@ -110,8 +110,9 @@
110 110 /* #region backend */
111 111
112 112
113 113 public function multiorder_combine($data, $settings) {
114 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context.
114 115 $should_combine = apply_filters('nx_should_combine', true, $data, $settings);
115 116 if (!$should_combine || empty($settings['combine_multiorder']) || $settings['combine_multiorder'] != '1') {
116 117 return $data;
117 118 }
@@ -143,25 +144,28 @@
143 144 $item_titles[$key]
144 145 );
145 146 } else {
146 147 $singular = !empty($settings['combine_multiorder_text'])
147 - ? __($settings['combine_multiorder_text'], 'notificationx')
148 + ? $settings['combine_multiorder_text']
148 149 : __('more product', 'notificationx');
149 150
150 151 $plural = !empty($settings['combine_multiorder_text_plural'])
151 - ? __($settings['combine_multiorder_text_plural'], 'notificationx')
152 + ? $settings['combine_multiorder_text_plural']
152 153 : __('more products', 'notificationx');
153 154
154 - // Proper plural handling
155 + // Both forms are already resolved here - either a user-entered
156 + // override or an already-translated default - so they are never
157 + // catalogue msgids. _n() would find no entry and fall back to
158 + // exactly this choice, so make it explicit.
155 159 $more_product_text = sprintf(
156 - _n($singular, $plural, $item, 'notificationx'),
160 + 1 == $item ? $singular : $plural,
157 161 $item
158 162 );
159 163 $products_more_title = sprintf('%d %s', $item, $more_product_text);
160 164 }
161 165
162 - // translators: %1$s: title, %2$s: combined more products text.
163 166 $items[$key]['title'] = sprintf(
167 + /* translators: %1$s: product title, %2$s: combined "and N more products" text */
164 168 __('%1$s & %2$s', 'notificationx'),
165 169 $items[$key]['title'],
166 170 $products_more_title
167 171 );
@@ -252,9 +256,9 @@
252 256 */
253 257 public function get_payments( $days, $amount ) {
254 258 // $date = '-' . intval( $days ) . ' days';
255 259 // $start_date = strtotime( $date );
256 - $from = date('Y-m-d H:i:s', $days);
260 + $from = gmdate('Y-m-d H:i:s', $days);
257 261
258 262 $amount = $amount > 0 ? $amount : -1;
259 263
260 264 $args = array(
@@ -394,8 +398,9 @@
394 398 }
395 399 /* #endregion */
396 400
397 401 public function doc(){
402 + /* translators: %1$s: Easy Digital Downloads installed & activated link URL, %2$s: documentation link URL, %3$s: Integration with Easy Digital Downloads link URL, %4$s: NotificationX Increase Sales on WordPress link URL */
398 403 return sprintf(__('<p>Make sure that you have <a href="%1$s" target="_blank">Easy Digital Downloads installed & activated</a> to use its campaign & product sales data. For further assistance, check out our step by step <a target="_blank" href="%2$s">documentation</a>.</p>
399 404 <p>👉 NotificationX <a target="_blank" href="%3$s">Integration with Easy Digital Downloads</a></p>
400 405 <p><strong>Recommended Blog:</strong></p>
401 406 <p>🔥 How Does <a target="_blank" href="%4$s">NotificationX Increase Sales on WordPress</a> Websites?</p>', 'notificationx'),