base = 'bigshop'; $this->path = get_template_directory() . '/plugin-bundle/'; add_action( 'tgmpa_register', [ $this, 'register_required_plugins' ] ); } public function register_required_plugins() { $plugins = [ [ 'name' => 'Bigshop Core', 'slug' => 'bigshop-core', 'source' => 'https://woothemer.com/plugins/bigshop-core.zip', 'required' => true, 'version' => '1.0.0' ], [ 'name' => 'WT Framework', 'slug' => 'wt-framework', 'source' => 'https://woothemer.com/plugins/wt-framework.zip', 'required' => true, 'version' => '3.0.0' ], // Repository [ 'name' => 'ShopBuilder Elementor WooCommerce Builder', 'slug' => 'shopbuilder', 'required' => true, ], [ 'name' => 'Variation Images Gallery for WooCommerce', 'slug' => 'woo-product-variation-gallery', 'required' => false, ], [ 'name' => 'Variation Swatches for WooCommerce', 'slug' => 'woo-product-variation-swatches', 'required' => false, ], [ 'name' => esc_html__('Elementor Page Builder','bigshop'), 'slug' => 'elementor', 'required' => false, ], [ 'name' => esc_html__('WP Fluent Forms','bigshop'), 'slug' => 'fluentform', 'required' => false, ], [ 'name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => false, ], ]; $config = [ 'id' => $this->base, // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => $this->path, // Default absolute path to bundled plugins. 'menu' => $this->base . '-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ]; tgmpa( $plugins, $config ); } }