From 41b8d16d89f30f0e4fe27a00f8878ad1d5fd12b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Tue, 7 Nov 2023 15:05:28 +0100 Subject: [PATCH] Add missing condition to avoid a php warning when 'plugins' is not set (#11652) --- src/BlockPatterns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BlockPatterns.php b/src/BlockPatterns.php index 47579bd9f0a..bcaef333a8d 100644 --- a/src/BlockPatterns.php +++ b/src/BlockPatterns.php @@ -250,7 +250,7 @@ public function schedule_on_option_update( $option, $value ) { * @param array $options Array of bulk item update data. */ public function schedule_on_plugin_update( $upgrader_object, $options ) { - if ( 'update' === $options['action'] && 'plugin' === $options['type'] ) { + if ( 'update' === $options['action'] && 'plugin' === $options['type'] && isset( $options['plugins'] ) ) { foreach ( $options['plugins'] as $plugin ) { if ( str_contains( $plugin, 'woocommerce-gutenberg-products-block.php' ) || str_contains( $plugin, 'woocommerce.php' ) ) { $business_description = get_option( 'woo_ai_describe_store_description' );