register_contents(); $this->register_styles(); } protected function register_contents(): void { $this->start_controls_section( 'sec_general', [ 'label' => __( 'General', 'addonskit-for-elementor' ), ] ); $this->add_control( 'sec_heading', [ 'label' => __( 'This widget works only in Checkout page. It has no additional elementor settings.', 'addonskit-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->end_controls_section(); } protected function register_styles(): void { $this->register_text_controls( __( 'Instruction', 'addonskit-for-elementor' ), 'instruction', '.directorist-checkout-text' ); $this->register_container_style_controls( __( 'Section Container', 'addonskit-for-elementor' ), 'directorist_checkout_summery_area', '.directorist-checkout-card', ); $this->register_section_title_controls(); $this->register_section_content_controls(); $this->register_button_controls(); } protected function render(): void { if ( is_user_logged_in() && Helper::is_edit() ) { require_once __DIR__ . "/output.php"; } else { Helper::run_shortcode( 'directorist_checkout' ); } } }