| @@ -5,8 +5,9 @@ | ||
| 5 | 5 | use Elementor\Core\Isolation\Wordpress_Adapter; |
| 6 | 6 | use Elementor\Core\Isolation\Wordpress_Adapter_Interface; |
| 7 | 7 | use Elementor\Core\Isolation\Elementor_Adapter; |
| 8 | 8 | use Elementor\Core\Isolation\Elementor_Adapter_Interface; |
| 9 | +use Elementor\Core\Utils\Isolation_Manager; | |
| 9 | 10 | use Elementor\Modules\Checklist\Module as Checklist_Module; |
| 10 | 11 | |
| 11 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | 13 | exit; // Exit if accessed directly. |
| @@ -74,9 +75,9 @@ | ||
| 74 | 75 | |
| 75 | 76 | /** |
| 76 | 77 | * Step_Base constructor. |
| 77 | 78 | * |
| 78 | - * @param Checklist_Module $module | |
| 79 | + * @param Checklist_Module $module | |
| 79 | 80 | * @param ?Wordpress_Adapter_Interface $wordpress_adapter |
| 80 | 81 | * @param ?Elementor_Adapter_Interface $elementor_adapter |
| 81 | 82 | * @return void |
| 82 | 83 | */ |
| @@ -81,12 +82,11 @@ | ||
| 81 | 82 | * @return void |
| 82 | 83 | */ |
| 83 | 84 | public function __construct( Checklist_Module $module, ?Wordpress_Adapter_Interface $wordpress_adapter = null, ?Elementor_Adapter_Interface $elementor_adapter = null, $promotion_data = null ) { |
| 84 | 85 | $this->module = $module; |
| 85 | - $this->wordpress_adapter = $wordpress_adapter ?? new Wordpress_Adapter(); | |
| 86 | - $this->elementor_adapter = $elementor_adapter ?? new Elementor_Adapter(); | |
| 86 | + $this->wordpress_adapter = $wordpress_adapter ?? Isolation_Manager::get_adapter( Wordpress_Adapter::class ); | |
| 87 | + $this->elementor_adapter = $elementor_adapter ?? Isolation_Manager::get_adapter( Elementor_Adapter::class ); | |
| 87 | 88 | $this->promotion_data = $promotion_data; |
| 88 | - | |
| 89 | 89 | $this->user_progress = $module->get_step_progress( $this->get_id() ) ?? $this->get_step_initial_progress(); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |