File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public static function instance() {
9292
9393 if ( null === self ::$ _instance ) {
9494 add_filter ( 'themeisle_sdk_products ' , [ __CLASS__ , 'register_sdk ' ] );
95- add_filter ( 'themeisle_sdk_ran_promos ' , ' __return_true ' );
95+ add_filter ( 'themeisle_sdk_ran_promos ' , [ __CLASS__ , ' sdk_hide_promo_notice ' ] );
9696 add_filter ( 'optimole-wp_uninstall_feedback_icon ' , [ __CLASS__ , 'change_icon ' ] );
9797 add_filter ( 'optimole_wp_uninstall_feedback_after_css ' , [ __CLASS__ , 'adds_uf_css ' ] );
9898 add_filter ( 'optimole_wp_feedback_review_message ' , [ __CLASS__ , 'change_review_message ' ] );
@@ -246,4 +246,19 @@ public function __clone() {
246246 public function __wakeup () {
247247 _doing_it_wrong ( __FUNCTION__ , __ ( 'Cheatin’ huh? ' , 'optimole-wp ' ), '1.0.0 ' );
248248 }
249+
250+ /**
251+ * Hide SDK promo notice for pro uses.
252+ *
253+ * @access public
254+ */
255+ public static function sdk_hide_promo_notice () {
256+ if ( self ::$ _instance ->admin ->settings ->is_connected () ) {
257+ $ service_data = self ::$ _instance ->admin ->settings ->get ( 'service_data ' );
258+ if ( isset ( $ service_data ['plan ' ] ) && 'free ' !== $ service_data ['plan ' ] ) {
259+ return false ;
260+ }
261+ }
262+ return true ;
263+ }
249264}
You can’t perform that action at this time.
0 commit comments