| @@ -84,9 +84,13 @@ | ||
| 84 | 84 | add_action( 'wp_authenticate_user', array( $this->service, 'during_core_authentication' ), 100, 2 ); |
| 85 | 85 | add_filter( 'random_password', array( $this->service, 'generate_password' ), 10, 2 ); |
| 86 | 86 | |
| 87 | 87 | // WooCommerce-specific hooks — each gated on its own form setting. |
| 88 | - if ( $this->woo->is_activated() && ! empty( $this->model->plugins['woocommerce'] ) ) { | |
| 88 | + if ( | |
| 89 | + $this->woo->is_activated() && | |
| 90 | + isset( $this->model->plugins['woocommerce'] ) && | |
| 91 | + $this->model->plugins['woocommerce'] | |
| 92 | + ) { | |
| 89 | 93 | $woo_forms = $this->model->forms['woocommerce'] ?? array(); |
| 90 | 94 | |
| 91 | 95 | if ( array() !== $woo_forms ) { |
| 92 | 96 | add_action( 'wp_enqueue_scripts', array( $this->service, 'scripts' ) ); |