| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | * |
| 35 | 35 | * @return int|void |
| 36 | 36 | */ |
| 37 | 37 | public static function check_version() { |
| 38 | - $version = ExtraSettings::instance()->get_option( 'rtsb_version' ) ?? get_option( 'rtsb_version' ); | |
| 38 | + $version = ExtraSettings::instance()->get_option( 'rtsb_version', '' ) ?? get_option( 'rtsb_version' ); | |
| 39 | 39 | if ( version_compare( $version, RTSB_VERSION, '<' ) ) { |
| 40 | 40 | if ( ! $version ) { |
| 41 | 41 | self::set_default_options(); |
| 42 | 42 | if ( ! Fns::get_product() ) { |
| @@ -100,15 +100,14 @@ | ||
| 100 | 100 | */ |
| 101 | 101 | public static function set_default_options() { |
| 102 | 102 | $sections = Settings::instance()->get_sections(); |
| 103 | 103 | foreach ( $sections as $sections_id => $section ) { |
| 104 | - $rawOptions = []; | |
| 105 | 104 | if ( ! empty( $section['list'] ) ) { |
| 106 | 105 | foreach ( $section['list'] as $blocks_id => $blocks ) { |
| 106 | + $rawOptions = []; | |
| 107 | 107 | if ( ! rtsb()->has_pro() && 'free' !== ( $blocks['package'] ?? '' ) ) { |
| 108 | 108 | continue; |
| 109 | 109 | } |
| 110 | - | |
| 111 | 110 | $rawOptions['active'] = $blocks['active'] ?? null; |
| 112 | 111 | |
| 113 | 112 | if ( ! empty( $blocks['fields'] ) ) { |
| 114 | 113 | foreach ( $blocks['fields'] as $field_id => $field ) { |