We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e31be2 commit e35d78dCopy full SHA for e35d78d
product-brands.php
@@ -15,6 +15,14 @@
15
require_once(plugin_dir_path(__FILE__) . 'includes/class-product-brand-admin.php');
16
require_once(plugin_dir_path(__FILE__) . 'includes/class-product-brand-meta.php');
17
18
+function my_plugin_activation_hook() {
19
+ if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
20
+ deactivate_plugins( plugin_basename( __FILE__ ) );
21
+ wp_die( 'Sorry, but this plugin requires WooCommerce to be installed and activated.' );
22
+ }
23
+}
24
+
25
+register_activation_hook( __FILE__, 'my_plugin_activation_hook' );
26
27
// Define the function that registers the plugin
28
function my_product_brand_plugin() {
0 commit comments