Passed
Push — master ( 3c1501...97dd81 )
by Stiofan
05:17 queued 10s
created
includes/admin/html-admin-page-addons.php 2 patches
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 if ( ! defined( 'ABSPATH' ) ) {
7
-	exit;
7
+    exit;
8 8
 }
9 9
 add_ThickBox();
10 10
 ?>
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
 	<?php if ( $tabs ) { ?>
15 15
 		<nav class="nav-tab-wrapper wpi-nav-tab-wrapper">
16 16
 			<?php
17
-			foreach ( $tabs as $name => $label ) {
18
-				echo '<a href="' . esc_url( admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
19
-			}
20
-			do_action( 'wpi_addons_tabs' );
21
-			?>
17
+            foreach ( $tabs as $name => $label ) {
18
+                echo '<a href="' . esc_url( admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
19
+            }
20
+            do_action( 'wpi_addons_tabs' );
21
+            ?>
22 22
 		</nav>
23 23
 
24 24
 		<?php
25 25
 
26
-		if ( $current_tab == 'membership' ) {
26
+        if ( $current_tab == 'membership' ) {
27 27
 
28
-			?>
28
+            ?>
29 29
 
30 30
 			<div class="wpi-membership-tab-conatiner">
31 31
 				<div class="membership-content">
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 					<h2><?php esc_html_e( 'Have a membership key?', 'invoicing' ); ?></h2>
37 37
 					<p>
38 38
 						<?php
39
-						$wpeu_admin = new External_Updates_Admin( 'wpinvoicing.com', '1' );
40
-						echo wp_kses_post( $wpeu_admin->render_licence_actions( 'wpinvoicing.com', 'membership', array( 95, 106, 108, 12351 ) ) );
41
-						?>
39
+                        $wpeu_admin = new External_Updates_Admin( 'wpinvoicing.com', '1' );
40
+                        echo wp_kses_post( $wpeu_admin->render_licence_actions( 'wpinvoicing.com', 'membership', array( 95, 106, 108, 12351 ) ) );
41
+                        ?>
42 42
 					</p>
43 43
 				<?php } ?>
44 44
 
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
 							<div class="feature-list">
49 49
 								<ul>
50 50
 									<?php
51
-									$addon_obj = new WPInv_Admin_Addons();
52
-									if ( $addons = $addon_obj->get_section_data( 'addons' ) ) {
53
-										foreach ( $addons as $addon ) {
54
-											echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
55
-										}
56
-									}
57
-									?>
51
+                                    $addon_obj = new WPInv_Admin_Addons();
52
+                                    if ( $addons = $addon_obj->get_section_data( 'addons' ) ) {
53
+                                        foreach ( $addons as $addon ) {
54
+                                            echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
55
+                                        }
56
+                                    }
57
+                                    ?>
58 58
 									</ul>
59 59
 
60 60
 									<div class="feature-cta">
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 									<h3><?php esc_html_e( 'Included Gateways:', 'invoicing' ); ?></h3>
66 66
 									<ul>
67 67
 										<?php
68
-										if ( $addons = $addon_obj->get_section_data( 'gateways' ) ) {
69
-											foreach ( $addons as $addon ) {
70
-												echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
71
-											}
72
-										}
73
-										?>
68
+                                        if ( $addons = $addon_obj->get_section_data( 'gateways' ) ) {
69
+                                            foreach ( $addons as $addon ) {
70
+                                                echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
71
+                                            }
72
+                                        }
73
+                                        ?>
74 74
 								</ul>
75 75
 							</div>
76 76
 
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 						<div class="testimonial-content">
82 82
 							<div class="t-image">
83 83
 								<?php
84
-									echo '<img src="' . esc_url( plugins_url( 'images/t-image2.png', dirname( __FILE__ ) ) ) . '" > ';
85
-								?>
84
+                                    echo '<img src="' . esc_url( plugins_url( 'images/t-image2.png', dirname( __FILE__ ) ) ) . '" > ';
85
+                                ?>
86 86
 							</div>
87 87
 							<div class="t-content">
88 88
 								<p>
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 						<div class="testimonial-content">
102 102
 							<div class="t-image">
103 103
 								<?php
104
-									echo '<img src="' . esc_url( plugins_url( 'images/t-image1.png', dirname( __FILE__ ) ) ) . '" > ';
105
-								?>
104
+                                    echo '<img src="' . esc_url( plugins_url( 'images/t-image1.png', dirname( __FILE__ ) ) ) . '" > ';
105
+                                ?>
106 106
 							</div>
107 107
 							<div class="t-content">
108 108
 								<p>
@@ -126,26 +126,26 @@  discard block
 block discarded – undo
126 126
 			</div>
127 127
 		</div>
128 128
 			<?php
129
-		} else {
130
-			$installed_plugins = get_plugins();
129
+        } else {
130
+            $installed_plugins = get_plugins();
131 131
             $addon_obj = new WPInv_Admin_Addons();
132
-			if ( $addons = $addon_obj->get_section_data( $current_tab ) ) :
133
-				//print_r($addons);
134
-				?>
132
+            if ( $addons = $addon_obj->get_section_data( $current_tab ) ) :
133
+                //print_r($addons);
134
+                ?>
135 135
 				<ul class="wpi-products">
136 136
                 <?php
137 137
                 foreach ( $addons as $addon ) :
138 138
                         if ( 965 == $addon->info->id ) {
139 139
 continue;}// don't show quote add on
140
-						?>
140
+                        ?>
141 141
                         <li class="wpi-product">
142 142
 								<div class="wpi-product-title">
143 143
 									<h3>
144 144
                                     <?php
145
-										if ( ! empty( $addon->info->excerpt ) ) {
146
-										wpi_help_tip( $addon->info->excerpt, false, false, true );
147
-										}
148
-										echo esc_html( $addon->info->title );
145
+                                        if ( ! empty( $addon->info->excerpt ) ) {
146
+                                        wpi_help_tip( $addon->info->excerpt, false, false, true );
147
+                                        }
148
+                                        echo esc_html( $addon->info->title );
149 149
                                         ?>
150 150
                                         </h3>
151 151
 								</div>
@@ -156,32 +156,32 @@  discard block
 block discarded – undo
156 156
 									<?php
157 157
                                     endif;
158 158
 
159
-									if ( 'stripe-payment-gateway' == $addon->info->slug ) {
160
-										$addon->info->slug = 'getpaid-stripe-payments';
161
-										$addon->info->link = 'https://wordpress.org/plugins/getpaid-stripe-payments/';
162
-									}
163
-
164
-									if ( isset( $addon->info->link ) && substr( $addon->info->link, 0, 21 ) === 'https://wordpress.org' ) {
165
-										echo '<a href="' . esc_url( admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug ) ) . '&width=770&height=660&TB_iframe=true" class="thickbox" >';
166
-										echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
167
-										echo '</a>';
168
-									} elseif ( isset( $addon->info->link ) && ( substr( $addon->info->link, 0, 23 ) === 'https://wpinvoicing.com' || substr( $addon->info->link, 0, 21 ) === 'https://wpgetpaid.com' ) ) {
169
-										if ( defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {
170
-											$url = admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpgetpaid.com&TB_iframe=true' );
171
-										} else {
172
-											// if installed show activation link
173
-											if ( isset( $installed_plugins['wp-easy-updates/external-updates.php'] ) ) {
174
-												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
175
-											} else {
176
-												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
177
-											}
178
-										}
179
-										echo '<a href="' . esc_url( $url ) . '" class="thickbox">';
180
-										echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
181
-										echo '</a>';
182
-									}
183
-
184
-									?>
159
+                                    if ( 'stripe-payment-gateway' == $addon->info->slug ) {
160
+                                        $addon->info->slug = 'getpaid-stripe-payments';
161
+                                        $addon->info->link = 'https://wordpress.org/plugins/getpaid-stripe-payments/';
162
+                                    }
163
+
164
+                                    if ( isset( $addon->info->link ) && substr( $addon->info->link, 0, 21 ) === 'https://wordpress.org' ) {
165
+                                        echo '<a href="' . esc_url( admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug ) ) . '&width=770&height=660&TB_iframe=true" class="thickbox" >';
166
+                                        echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
167
+                                        echo '</a>';
168
+                                    } elseif ( isset( $addon->info->link ) && ( substr( $addon->info->link, 0, 23 ) === 'https://wpinvoicing.com' || substr( $addon->info->link, 0, 21 ) === 'https://wpgetpaid.com' ) ) {
169
+                                        if ( defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {
170
+                                            $url = admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpgetpaid.com&TB_iframe=true' );
171
+                                        } else {
172
+                                            // if installed show activation link
173
+                                            if ( isset( $installed_plugins['wp-easy-updates/external-updates.php'] ) ) {
174
+                                                $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
175
+                                            } else {
176
+                                                $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
177
+                                            }
178
+                                        }
179
+                                        echo '<a href="' . esc_url( $url ) . '" class="thickbox">';
180
+                                        echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
181
+                                        echo '</a>';
182
+                                    }
183
+
184
+                                    ?>
185 185
 
186 186
 								</span>
187 187
 
@@ -189,15 +189,15 @@  discard block
 block discarded – undo
189 189
 								<span class="wpi-product-button">
190 190
 									<?php
191 191
                                     $addon_obj->output_button( $addon );
192
-									?>
192
+                                    ?>
193 193
 								</span>
194 194
 
195 195
 								<span class="wpi-price"><?php //print_r($addon); //echo wp_kses_post( $addon->price ); ?></span></li><?php endforeach; ?></ul>
196 196
 			<?php
197 197
             endif;
198
-		}
198
+        }
199 199
 }
200
-	?>
200
+    ?>
201 201
 
202 202
 
203 203
 	<div class="clearfix" ></div>
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
 			<input class="wpeu-licence-key" type="text" placeholder="<?php esc_attr_e( 'Enter your licence key', 'invoicing' ); ?>"> <button class="button-primary wpeu-licence-popup-button" ><?php esc_html_e( 'Install', 'invoicing' ); ?></button>
217 217
 			<br>
218 218
 			<?php
219
-			printf( esc_html__( '%1$sFind your licence key here%2$s OR %3$sBuy one here%4$s', 'invoicing' ), '<a href="https://wpinvoicing.com/your-account/" target="_blank">', '</a>', '<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">', '</a>' );
220
-			?>
219
+            printf( esc_html__( '%1$sFind your licence key here%2$s OR %3$sBuy one here%4$s', 'invoicing' ), '<a href="https://wpinvoicing.com/your-account/" target="_blank">', '</a>', '<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">', '</a>' );
220
+            ?>
221 221
 		</span>
222 222
 	</div>
223 223
 
Please login to merge, or discard this patch.
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -3,27 +3,27 @@  discard block
 block discarded – undo
3 3
  * Admin View: Page - Addons
4 4
  *
5 5
  */
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if (!defined('ABSPATH')) {
7 7
 	exit;
8 8
 }
9 9
 add_ThickBox();
10 10
 ?>
11 11
 <div class="wrap wpi_addons_wrap">
12
-	<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
12
+	<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
13 13
 
14
-	<?php if ( $tabs ) { ?>
14
+	<?php if ($tabs) { ?>
15 15
 		<nav class="nav-tab-wrapper wpi-nav-tab-wrapper">
16 16
 			<?php
17
-			foreach ( $tabs as $name => $label ) {
18
-				echo '<a href="' . esc_url( admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
17
+			foreach ($tabs as $name => $label) {
18
+				echo '<a href="' . esc_url(admin_url('admin.php?page=wpi-addons&tab=' . $name)) . '" class="nav-tab ' . ($current_tab == $name ? 'nav-tab-active' : '') . '">' . esc_html($label) . '</a>';
19 19
 			}
20
-			do_action( 'wpi_addons_tabs' );
20
+			do_action('wpi_addons_tabs');
21 21
 			?>
22 22
 		</nav>
23 23
 
24 24
 		<?php
25 25
 
26
-		if ( $current_tab == 'membership' ) {
26
+		if ($current_tab == 'membership') {
27 27
 
28 28
 			?>
29 29
 
@@ -32,42 +32,42 @@  discard block
 block discarded – undo
32 32
 <!--
33 33
 				<h2>With our WPInvoicing Membership you get access to all our products!</h2>
34 34
 				<p><a class="button button-primary" href="https://wpinvoicing.com/downloads/membership/">View Memberships</a></p>-->
35
-				<?php if ( defined( 'WP_EASY_UPDATES_ACTIVE' ) ) { ?>
36
-					<h2><?php esc_html_e( 'Have a membership key?', 'invoicing' ); ?></h2>
35
+				<?php if (defined('WP_EASY_UPDATES_ACTIVE')) { ?>
36
+					<h2><?php esc_html_e('Have a membership key?', 'invoicing'); ?></h2>
37 37
 					<p>
38 38
 						<?php
39
-						$wpeu_admin = new External_Updates_Admin( 'wpinvoicing.com', '1' );
40
-						echo wp_kses_post( $wpeu_admin->render_licence_actions( 'wpinvoicing.com', 'membership', array( 95, 106, 108, 12351 ) ) );
39
+						$wpeu_admin = new External_Updates_Admin('wpinvoicing.com', '1');
40
+						echo wp_kses_post($wpeu_admin->render_licence_actions('wpinvoicing.com', 'membership', array(95, 106, 108, 12351)));
41 41
 						?>
42 42
 					</p>
43 43
 				<?php } ?>
44 44
 
45 45
 				<div class="membership-cta-contet">
46 46
 					<div class="main-cta">
47
-							<h2><?php esc_html_e( 'Membership benefits Include:', 'invoicing' ); ?></h2>
47
+							<h2><?php esc_html_e('Membership benefits Include:', 'invoicing'); ?></h2>
48 48
 							<div class="feature-list">
49 49
 								<ul>
50 50
 									<?php
51 51
 									$addon_obj = new WPInv_Admin_Addons();
52
-									if ( $addons = $addon_obj->get_section_data( 'addons' ) ) {
53
-										foreach ( $addons as $addon ) {
54
-											echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
52
+									if ($addons = $addon_obj->get_section_data('addons')) {
53
+										foreach ($addons as $addon) {
54
+											echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html($addon->info->title) . '</li>';
55 55
 										}
56 56
 									}
57 57
 									?>
58 58
 									</ul>
59 59
 
60 60
 									<div class="feature-cta">
61
-										<h3><?php esc_html_e( 'Membership Starts from', 'invoicing' ); ?></h3>
61
+										<h3><?php esc_html_e('Membership Starts from', 'invoicing'); ?></h3>
62 62
 										<h4>$99</h4>
63
-										<a href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php esc_attr_e( 'Buy Membership', 'invoicing' ); ?></a>
63
+										<a href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php esc_attr_e('Buy Membership', 'invoicing'); ?></a>
64 64
 									</div>
65
-									<h3><?php esc_html_e( 'Included Gateways:', 'invoicing' ); ?></h3>
65
+									<h3><?php esc_html_e('Included Gateways:', 'invoicing'); ?></h3>
66 66
 									<ul>
67 67
 										<?php
68
-										if ( $addons = $addon_obj->get_section_data( 'gateways' ) ) {
69
-											foreach ( $addons as $addon ) {
70
-												echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
68
+										if ($addons = $addon_obj->get_section_data('gateways')) {
69
+											foreach ($addons as $addon) {
70
+												echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html($addon->info->title) . '</li>';
71 71
 											}
72 72
 										}
73 73
 										?>
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 						<div class="testimonial-content">
82 82
 							<div class="t-image">
83 83
 								<?php
84
-									echo '<img src="' . esc_url( plugins_url( 'images/t-image2.png', dirname( __FILE__ ) ) ) . '" > ';
84
+									echo '<img src="' . esc_url(plugins_url('images/t-image2.png', dirname(__FILE__))) . '" > ';
85 85
 								?>
86 86
 							</div>
87 87
 							<div class="t-content">
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 						<div class="testimonial-content">
102 102
 							<div class="t-image">
103 103
 								<?php
104
-									echo '<img src="' . esc_url( plugins_url( 'images/t-image1.png', dirname( __FILE__ ) ) ) . '" > ';
104
+									echo '<img src="' . esc_url(plugins_url('images/t-image1.png', dirname(__FILE__))) . '" > ';
105 105
 								?>
106 106
 							</div>
107 107
 							<div class="t-content">
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 						</div>
118 118
 					</div>
119 119
 					<div class="member-footer">
120
-						<a class="footer-btn" href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php esc_html_e( 'Buy Membership', 'invoicing' ); ?></a>
121
-						<a class="footer-link" href="post-new.php?post_type=wpi_invoice"><?php esc_html_e( 'Create Invoice', 'invoicing' ); ?></a>
120
+						<a class="footer-btn" href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php esc_html_e('Buy Membership', 'invoicing'); ?></a>
121
+						<a class="footer-link" href="post-new.php?post_type=wpi_invoice"><?php esc_html_e('Create Invoice', 'invoicing'); ?></a>
122 122
 					</div>
123 123
 				</div>
124 124
 
@@ -129,55 +129,55 @@  discard block
 block discarded – undo
129 129
 		} else {
130 130
 			$installed_plugins = get_plugins();
131 131
             $addon_obj = new WPInv_Admin_Addons();
132
-			if ( $addons = $addon_obj->get_section_data( $current_tab ) ) :
132
+			if ($addons = $addon_obj->get_section_data($current_tab)) :
133 133
 				//print_r($addons);
134 134
 				?>
135 135
 				<ul class="wpi-products">
136 136
                 <?php
137
-                foreach ( $addons as $addon ) :
138
-                        if ( 965 == $addon->info->id ) {
139
-continue;}// don't show quote add on
137
+                foreach ($addons as $addon) :
138
+                        if (965 == $addon->info->id) {
139
+continue; }// don't show quote add on
140 140
 						?>
141 141
                         <li class="wpi-product">
142 142
 								<div class="wpi-product-title">
143 143
 									<h3>
144 144
                                     <?php
145
-										if ( ! empty( $addon->info->excerpt ) ) {
146
-										wpi_help_tip( $addon->info->excerpt, false, false, true );
145
+										if (!empty($addon->info->excerpt)) {
146
+										wpi_help_tip($addon->info->excerpt, false, false, true);
147 147
 										}
148
-										echo esc_html( $addon->info->title );
148
+										echo esc_html($addon->info->title);
149 149
                                         ?>
150 150
                                         </h3>
151 151
 								</div>
152 152
 
153 153
 								<span class="wpi-product-image">
154
-									<?php if ( ! empty( $addon->info->thumbnail ) ) : ?>
155
-										<img src="<?php echo esc_attr( $addon->info->thumbnail ); ?>"/>
154
+									<?php if (!empty($addon->info->thumbnail)) : ?>
155
+										<img src="<?php echo esc_attr($addon->info->thumbnail); ?>"/>
156 156
 									<?php
157 157
                                     endif;
158 158
 
159
-									if ( 'stripe-payment-gateway' == $addon->info->slug ) {
159
+									if ('stripe-payment-gateway' == $addon->info->slug) {
160 160
 										$addon->info->slug = 'getpaid-stripe-payments';
161 161
 										$addon->info->link = 'https://wordpress.org/plugins/getpaid-stripe-payments/';
162 162
 									}
163 163
 
164
-									if ( isset( $addon->info->link ) && substr( $addon->info->link, 0, 21 ) === 'https://wordpress.org' ) {
165
-										echo '<a href="' . esc_url( admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug ) ) . '&width=770&height=660&TB_iframe=true" class="thickbox" >';
166
-										echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
164
+									if (isset($addon->info->link) && substr($addon->info->link, 0, 21) === 'https://wordpress.org') {
165
+										echo '<a href="' . esc_url(admin_url('/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug)) . '&width=770&height=660&TB_iframe=true" class="thickbox" >';
166
+										echo '<span class="wpi-product-info">' . esc_html__('More info', 'invoicing') . '</span>';
167 167
 										echo '</a>';
168
-									} elseif ( isset( $addon->info->link ) && ( substr( $addon->info->link, 0, 23 ) === 'https://wpinvoicing.com' || substr( $addon->info->link, 0, 21 ) === 'https://wpgetpaid.com' ) ) {
169
-										if ( defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {
170
-											$url = admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpgetpaid.com&TB_iframe=true' );
168
+									} elseif (isset($addon->info->link) && (substr($addon->info->link, 0, 23) === 'https://wpinvoicing.com' || substr($addon->info->link, 0, 21) === 'https://wpgetpaid.com')) {
169
+										if (defined('WP_EASY_UPDATES_ACTIVE')) {
170
+											$url = admin_url('/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpgetpaid.com&TB_iframe=true');
171 171
 										} else {
172 172
 											// if installed show activation link
173
-											if ( isset( $installed_plugins['wp-easy-updates/external-updates.php'] ) ) {
173
+											if (isset($installed_plugins['wp-easy-updates/external-updates.php'])) {
174 174
 												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
175 175
 											} else {
176 176
 												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
177 177
 											}
178 178
 										}
179
-										echo '<a href="' . esc_url( $url ) . '" class="thickbox">';
180
-										echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
179
+										echo '<a href="' . esc_url($url) . '" class="thickbox">';
180
+										echo '<span class="wpi-product-info">' . esc_html__('More info', 'invoicing') . '</span>';
181 181
 										echo '</a>';
182 182
 									}
183 183
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
 								<span class="wpi-product-button">
190 190
 									<?php
191
-                                    $addon_obj->output_button( $addon );
191
+                                    $addon_obj->output_button($addon);
192 192
 									?>
193 193
 								</span>
194 194
 
@@ -202,21 +202,21 @@  discard block
 block discarded – undo
202 202
 
203 203
 	<div class="clearfix" ></div>
204 204
 
205
-	<?php if ( $current_tab == 'addons' ) { ?>
206
-	<p><?php printf(  esc_attr__( 'All of our Addons can be found on wpGetPaid.com here: %sInvoicing Addons%s', 'invoicing' ), '<a href="https://wpinvoicing.com/downloads/category/addons/">','</a>' ); ?></p>
207
-	<?php } if ( $current_tab == 'gateways' ) { ?>
208
-    <p><?php printf( esc_attr__( 'All of our Payment Gateways can be found on wpGetPaid.com here: %sGetPaid Payment Gateways %s', 'invoicing' ), '<a href="https://wpinvoicing.com/downloads/category/gateways/">','</a>'  ); ?></p>
205
+	<?php if ($current_tab == 'addons') { ?>
206
+	<p><?php printf(esc_attr__('All of our Addons can be found on wpGetPaid.com here: %sInvoicing Addons%s', 'invoicing'), '<a href="https://wpinvoicing.com/downloads/category/addons/">', '</a>'); ?></p>
207
+	<?php } if ($current_tab == 'gateways') { ?>
208
+    <p><?php printf(esc_attr__('All of our Payment Gateways can be found on wpGetPaid.com here: %sGetPaid Payment Gateways %s', 'invoicing'), '<a href="https://wpinvoicing.com/downloads/category/gateways/">', '</a>'); ?></p>
209 209
     <?php } ?>
210 210
 
211
-	<div id="wpi-wpeu-required-activation" style="display:none;"><span class="wpi-notification "><?php echo wp_kses_post(  sprintf( __( "The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s'>activate</a> it now.", 'invoicing' ), wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=wp-easy-updates/external-updates.php' ), 'activate-plugin_wp-easy-updates/external-updates.php' ) ) ); ?></span></div>
212
-	<div id="wpi-wpeu-required-for-external" style="display:none;"><span class="wpi-notification "><?php echo wp_kses_post( sprintf( __( "The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s' onclick='window.open(\"https://wpeasyupdates.com/wp-easy-updates.zip\", \"_blank\");' >download</a> and install it now.", 'invoicing' ), admin_url( 'plugin-install.php?tab=upload&wpeu-install=true' ) ) ); ?></span></div>
211
+	<div id="wpi-wpeu-required-activation" style="display:none;"><span class="wpi-notification "><?php echo wp_kses_post(sprintf(__("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s'>activate</a> it now.", 'invoicing'), wp_nonce_url(admin_url('plugins.php?action=activate&plugin=wp-easy-updates/external-updates.php'), 'activate-plugin_wp-easy-updates/external-updates.php'))); ?></span></div>
212
+	<div id="wpi-wpeu-required-for-external" style="display:none;"><span class="wpi-notification "><?php echo wp_kses_post(sprintf(__("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s' onclick='window.open(\"https://wpeasyupdates.com/wp-easy-updates.zip\", \"_blank\");' >download</a> and install it now.", 'invoicing'), admin_url('plugin-install.php?tab=upload&wpeu-install=true'))); ?></span></div>
213 213
 	<div id="wpeu-licence-popup" style="display:none;">
214 214
 		<span class="wpi-notification noti-white">
215
-			<h3 class="wpeu-licence-title"><?php esc_html_e( 'Licence key', 'invoicing' ); ?></h3>
216
-			<input class="wpeu-licence-key" type="text" placeholder="<?php esc_attr_e( 'Enter your licence key', 'invoicing' ); ?>"> <button class="button-primary wpeu-licence-popup-button" ><?php esc_html_e( 'Install', 'invoicing' ); ?></button>
215
+			<h3 class="wpeu-licence-title"><?php esc_html_e('Licence key', 'invoicing'); ?></h3>
216
+			<input class="wpeu-licence-key" type="text" placeholder="<?php esc_attr_e('Enter your licence key', 'invoicing'); ?>"> <button class="button-primary wpeu-licence-popup-button" ><?php esc_html_e('Install', 'invoicing'); ?></button>
217 217
 			<br>
218 218
 			<?php
219
-			printf( esc_html__( '%1$sFind your licence key here%2$s OR %3$sBuy one here%4$s', 'invoicing' ), '<a href="https://wpinvoicing.com/your-account/" target="_blank">', '</a>', '<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">', '</a>' );
219
+			printf(esc_html__('%1$sFind your licence key here%2$s OR %3$sBuy one here%4$s', 'invoicing'), '<a href="https://wpinvoicing.com/your-account/" target="_blank">', '</a>', '<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">', '</a>');
220 220
 			?>
221 221
 		</span>
222 222
 	</div>
Please login to merge, or discard this patch.