From e8872ddf8da8a106765b55af41a118b77b0b3c2a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 20:09:04 +0000 Subject: [PATCH 1/2] Initial plan From 08dd7954e5df046aeef67de597ea6e4c6191df1e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 20:16:59 +0000 Subject: [PATCH 2/2] Fix class not found error during plugin activation without composer dependencies Co-authored-by: soderlind <1649452+soderlind@users.noreply.github.com> --- redis-queue.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/redis-queue.php b/redis-queue.php index 8c59b5d..8f19b47 100644 --- a/redis-queue.php +++ b/redis-queue.php @@ -55,19 +55,37 @@ function redis_queue_migrate_options_v2() { add_action( 'plugins_loaded', 'redis_queue_migrate_options_v2', 1 ); // Bootstrap namespaced main class (new namespace & class name). -Soderlind\RedisQueue\Core\Redis_Queue::get_instance(); +if ( class_exists( 'Soderlind\RedisQueue\Core\Redis_Queue' ) ) { + Soderlind\RedisQueue\Core\Redis_Queue::get_instance(); +} else { + add_action( 'admin_notices', function() { + if ( current_user_can( 'activate_plugins' ) ) { + echo '
'; + echo 'Redis Queue: '; + echo esc_html__( 'Plugin dependencies are missing. Please run "composer install" in the plugin directory, or download the plugin from the official release.', 'redis-queue' ); + echo '