Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing condition to avoid a php warning when 'plugins' is not set (
Browse files Browse the repository at this point in the history
albarin authored and gigitux committed Nov 8, 2023
1 parent 14a7ed7 commit 461a73c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BlockPatterns.php
Original file line number Diff line number Diff line change
@@ -267,7 +267,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' );

0 comments on commit 461a73c

Please sign in to comment.