Code Duplication    Length = 5-5 lines in 3 locations

includes/admin/class-wc-admin-webhooks.php 3 locations

@@ 371-375 (lines=5) @@
368
	 * Notices.
369
	 */
370
	public static function notices() {
371
		if ( isset( $_GET['trashed'] ) ) {
372
			$trashed = absint( $_GET['trashed'] );
373
374
			WC_Admin_Settings::add_message( sprintf( _n( '1 webhook moved to the Trash.', '%d webhooks moved to the Trash.', $trashed, 'woocommerce' ), $trashed ) );
375
		}
376
377
		if ( isset( $_GET['untrashed'] ) ) {
378
			$untrashed = absint( $_GET['untrashed'] );
@@ 377-381 (lines=5) @@
374
			WC_Admin_Settings::add_message( sprintf( _n( '1 webhook moved to the Trash.', '%d webhooks moved to the Trash.', $trashed, 'woocommerce' ), $trashed ) );
375
		}
376
377
		if ( isset( $_GET['untrashed'] ) ) {
378
			$untrashed = absint( $_GET['untrashed'] );
379
380
			WC_Admin_Settings::add_message( sprintf( _n( '1 webhook restored from the Trash.', '%d webhooks restored from the Trash.', $untrashed, 'woocommerce' ), $untrashed ) );
381
		}
382
383
		if ( isset( $_GET['deleted'] ) ) {
384
			$deleted = absint( $_GET['deleted'] );
@@ 383-387 (lines=5) @@
380
			WC_Admin_Settings::add_message( sprintf( _n( '1 webhook restored from the Trash.', '%d webhooks restored from the Trash.', $untrashed, 'woocommerce' ), $untrashed ) );
381
		}
382
383
		if ( isset( $_GET['deleted'] ) ) {
384
			$deleted = absint( $_GET['deleted'] );
385
386
			WC_Admin_Settings::add_message( sprintf( _n( '1 webhook permanently deleted.', '%d webhooks permanently deleted.', $deleted, 'woocommerce' ), $deleted ) );
387
		}
388
389
		if ( isset( $_GET['updated'] ) ) {
390
			WC_Admin_Settings::add_message( __( 'Webhook updated successfully.', 'woocommerce' ) );