| @@ -40,8 +40,9 @@ | ||
| 40 | 40 | */ |
| 41 | 41 | public function show_notice() { |
| 42 | 42 | $defaults = [ |
| 43 | 43 | 'download_link' => rtsb()->pro_version_link(), |
| 44 | + 'global_check' => false, | |
| 44 | 45 | 'plugin_name' => 'ShopBuilder Pro', |
| 45 | 46 | 'image_url' => rtsb()->get_assets_uri( 'images/shopbuilder-100x100.svg' ), |
| 46 | 47 | 'option_name' => '', |
| 47 | 48 | 'start_date' => '', |
| @@ -53,8 +54,13 @@ | ||
| 53 | 54 | $this->options = wp_parse_args( $options, $defaults ); |
| 54 | 55 | $current = time(); |
| 55 | 56 | $start = strtotime( $this->options['start_date'] ); |
| 56 | 57 | $end = strtotime( $this->options['end_date'] ); |
| 58 | + | |
| 59 | + if ( $this->options['global_check'] ) { | |
| 60 | + return; | |
| 61 | + } | |
| 62 | + | |
| 57 | 63 | // Black Friday Notice. |
| 58 | 64 | if ( ! rtsb()->has_pro() && $start <= $current && $current <= $end ) { |
| 59 | 65 | if ( get_option( $this->options['option_name'] ) != '1' ) { |
| 60 | 66 | if ( ! isset( $GLOBALS['rtsb__notice'] ) ) { |