Code Duplication    Length = 14-14 lines in 2 locations

includes/admin/emails/class-new-offline-donation-email.php 1 location

@@ 277-290 (lines=14) @@
274
		 * @param $update_options
275
		 * @param $option_name
276
		 */
277
		public function set_notification_status( $update_options, $option_name ) {
278
			// Get updated settings.
279
			$update_options = give_get_settings();
280
281
			$notification_status = isset( $update_options['gateways']['offline'] ) ? 'enabled' : 'disabled';
282
283
			if (
284
				empty( $update_options[ "{$this->config['id']}_notification" ] )
285
				|| $notification_status !== $update_options[ "{$this->config['id']}_notification" ]
286
			) {
287
				$update_options[ "{$this->config['id']}_notification" ] = $notification_status;
288
				update_option( $option_name, $update_options );
289
			}
290
		}
291
292
		/**
293
		 * Register email settings to form metabox.

includes/admin/emails/class-offline-donation-instruction-email.php 1 location

@@ 245-258 (lines=14) @@
242
		 * @param $update_options
243
		 * @param $option_name
244
		 */
245
		public function set_notification_status( $update_options, $option_name ) {
246
			// Get updated settings.
247
			$update_options = give_get_settings();
248
249
			$notification_status = isset( $update_options['gateways']['offline'] ) ? 'enabled' : 'disabled';
250
251
			if (
252
				empty( $update_options["{$this->config['id']}_notification"] )
253
				|| $notification_status !== $update_options["{$this->config['id']}_notification"]
254
			) {
255
				$update_options["{$this->config['id']}_notification"] = $notification_status;
256
				update_option( $option_name, $update_options );
257
			}
258
		}
259
260
261
		/**