| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace RadiusTheme\SB; |
| 9 | 9 | |
| 10 | -use RadiusTheme\SB\Controllers\CacheController; | |
| 11 | 10 | use RadiusTheme\SB\Helpers\Migration; |
| 12 | 11 | use RadiusTheme\SB\Helpers\Installation; |
| 13 | 12 | use RadiusTheme\SB\Modules\ModuleManager; |
| 14 | 13 | use RadiusTheme\SB\Traits\SingletonTrait; |
| @@ -13,8 +12,9 @@ | ||
| 13 | 12 | use RadiusTheme\SB\Modules\ModuleManager; |
| 14 | 13 | use RadiusTheme\SB\Traits\SingletonTrait; |
| 15 | 14 | use RadiusTheme\SB\Controllers\Shortcodes; |
| 16 | 15 | use RadiusTheme\SB\Controllers\Dependencies; |
| 16 | +use RadiusTheme\SB\Controllers\CacheController; | |
| 17 | 17 | use RadiusTheme\SB\Controllers\Admin\AdminInit; |
| 18 | 18 | use RadiusTheme\SB\Controllers\AssetsController; |
| 19 | 19 | use RadiusTheme\SB\Controllers\BuilderController; |
| 20 | 20 | use RadiusTheme\SB\Controllers\SupportController; |
| @@ -21,8 +21,9 @@ | ||
| 21 | 21 | use RadiusTheme\SB\Controllers\Hooks\FilterHooks; |
| 22 | 22 | use RadiusTheme\SB\Controllers\Hooks\ActionHooks; |
| 23 | 23 | use RadiusTheme\SB\Controllers\Frontend\Ajax\AddToCart; |
| 24 | 24 | use RadiusTheme\SB\Controllers\Frontend\Ajax\AjaxLogin; |
| 25 | +use RadiusTheme\SB\Controllers\Frontend\Ajax\UpdateCheckoutSection; | |
| 25 | 26 | |
| 26 | 27 | // Do not allow directly accessing this file. |
| 27 | 28 | if ( ! defined( 'ABSPATH' ) ) { |
| 28 | 29 | exit( 'This script cannot be accessed directly.' ); |
| @@ -78,9 +79,9 @@ | ||
| 78 | 79 | */ |
| 79 | 80 | private function __construct() { |
| 80 | 81 | $this->define_constants(); |
| 81 | 82 | $this->post_type = 'product'; |
| 82 | - $this->current_theme = wp_get_theme()->get( 'Template' ) ? wp_get_theme()->get( 'Template' ) : wp_get_theme()->get( 'TextDomain' ); | |
| 83 | + $this->current_theme = wp_get_theme()->get( 'Template' ) ? wp_get_theme()->get( 'Template' ) : ( wp_get_theme()->get( 'TextDomain' ) ? wp_get_theme()->get( 'TextDomain' ) : strtolower( str_replace( ' ', '', wp_get_theme()->get( 'Name' ) ) ) ); | |
| 83 | 84 | add_action( 'init', [ $this, 'language' ] ); |
| 84 | 85 | add_action( 'plugins_loaded', [ $this, 'init' ], 15 ); |
| 85 | 86 | |
| 86 | 87 | // Register Plugin Active Hook. |
| @@ -88,9 +89,11 @@ | ||
| 88 | 89 | |
| 89 | 90 | // Register Plugin Deactivate Hook. |
| 90 | 91 | register_deactivation_hook( RTSB_FILE, [ Installation::class, 'deactivation' ] ); |
| 91 | 92 | |
| 92 | - SupportController::instance(); | |
| 93 | + if ( Dependencies::instance()->check() ) { | |
| 94 | + SupportController::instance(); | |
| 95 | + } | |
| 93 | 96 | |
| 94 | 97 | // HPOS Declare compatibility. |
| 95 | 98 | add_action( |
| 96 | 99 | 'before_woocommerce_init', |
| @@ -174,8 +177,9 @@ | ||
| 174 | 177 | |
| 175 | 178 | // Ajax. |
| 176 | 179 | AddToCart::instance(); |
| 177 | 180 | AjaxLogin::instance(); |
| 181 | + UpdateCheckoutSection::instance(); | |
| 178 | 182 | |
| 179 | 183 | BuilderController::instance(); |
| 180 | 184 | FilterHooks::init_hooks(); |
| 181 | 185 | ActionHooks::init_hooks(); |