diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index d555ac2..15ac356 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -63,7 +63,7 @@ jobs: - name: Start docker services and setup WordPress run: | - docker-compose -f ./tests/docker/docker-compose.yml up -d; + docker compose -f ./tests/docker/docker-compose.yml up -d; docker attach wordpress-cli; - name: cached dependencies diff --git a/tawkto/tawkto.php b/tawkto/tawkto.php index 29277f1..89a0d44 100644 --- a/tawkto/tawkto.php +++ b/tawkto/tawkto.php @@ -59,13 +59,21 @@ public function __construct() { update_option( 'tawkto-visibility-options', $visibility ); } + add_action( 'wp_loaded', array( &$this, 'init' ) ); add_action( 'admin_init', array( &$this, 'admin_init' ) ); add_action( 'admin_menu', array( &$this, 'add_menu' ) ); add_action( 'wp_ajax_tawkto_setwidget', array( &$this, 'action_setwidget' ) ); add_action( 'wp_ajax_tawkto_removewidget', array( &$this, 'action_removewidget' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'tawk_settings_assets' ) ); add_action( 'admin_notices', array( $this, 'tawk_admin_notice' ) ); + } + /** + * Initializes the plugin data + * + * @return void + */ + public function init() { if ( is_admin() ) { if ( false === function_exists( 'get_plugin_data' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php';