- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
670 B
PHP
Executable File
28 lines
670 B
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* WC Dependency Checker
|
|
*/
|
|
#[AllowDynamicProperties]
|
|
class BWFCRM_Plugin_Dependency {
|
|
|
|
private static $active_plugins;
|
|
|
|
public static function init() {
|
|
self::$active_plugins = (array) get_option( 'active_plugins', array() );
|
|
|
|
if ( is_multisite() ) {
|
|
self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
|
|
}
|
|
}
|
|
|
|
public static function woocommerce_active_check() {
|
|
if ( ! self::$active_plugins ) {
|
|
self::init();
|
|
}
|
|
|
|
return in_array( 'woocommerce/woocommerce.php', self::$active_plugins, true ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
|
|
}
|
|
|
|
}
|