init(); add_action( 'init', function () { // dd( wp_get_theme()->name ); } ); } public function init() { $this->themes = apply_filters( 'tier_pricing_table/integrations/themes', array( 'Avada' => Avada::class, 'Divi' => Divi::class, 'OceanWP' => OceanWp::class, 'Flatsome' => Flatsome::class, 'Shopkeeper' => Shopkeeper::class, 'The Retailer' => TheRetailer::class, 'Merchandiser' => Merchandiser::class, 'Electro' => Electro::class, ) ); $this->plugins = apply_filters( 'tier_pricing_table/integrations/plugins', array( 'MixMatch' => MixMatch::class ) ); foreach ( $this->themes as $themeName => $theme ) { if ( wp_get_theme()->name === $themeName ) { new $theme(); } } foreach ( $this->plugins as $pluginName => $plugin ) { new $plugin(); } } }