settings = new SALES_COUNTDOWN_TIMER_Data(); add_action( 'init', array( $this, 'init' ) ); add_action( 'admin_menu', array( $this, 'admin_menu' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 99 ); add_action( 'wp_ajax_woo_sctr_save_settings', array( $this, 'save_settings' ) ); add_filter( 'plugin_action_links_sales-countdown-timer/sales-countdown-timer.php', array( $this, 'settings_link' ) ); add_action( 'elementor/preview/enqueue_styles', [ $this, 'custom_elementor_preview_styles' ] ); } public function admin_menu() { add_menu_page( esc_html__( 'Sales Countdown Timer', 'sales-countdown-timer' ), esc_html__( 'Countdown Timer', 'sales-countdown-timer' ), 'manage_options', 'sales-countdown-timer', array( $this, 'settings' ), 'dashicons-clock', 2 ); if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { add_submenu_page( 'sales-countdown-timer', esc_html__( 'Checkout Countdown', 'sales-countdown-timer' ), esc_html__( 'Checkout Countdown', 'sales-countdown-timer' ), 'manage_options', 'sales-countdown-timer-checkout', array( $this, 'settings_checkout_countdown' ) ); } } public function custom_elementor_preview_styles() { wp_enqueue_style( 'woo-sctr-shortcode-style', SALES_COUNTDOWN_TIMER_CSS . 'shortcode-style.css', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); $elm_css = $this->settings->get_countdown_inline_style(); wp_add_inline_style( 'woo-sctr-shortcode-style', $elm_css ); } public function settings_checkout_countdown() { ?>