How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met

You can add the following code in your plugin. I have used this in my ARB booking plugin and it worked perfectly. The full details of the code with explanation can be found here: class FT_AdminNotice { protected $min_wc=”5.0.0″; //replace ‘5.0.0’ with your dependent plugin version number /** * Register the activation hook */ public … Read more

need to add custom field in more products

This code will allow you to display the upload form when the product is in the $special_category product category. add_action( ‘woocommerce_before_add_to_cart_form’, ‘display_additional_product_fields’, 9 ); function display_additional_product_fields() { global $product; // Product category or slug that will allow the upload field to be displayed. $special_category = 314; if ( ! has_term( $special_category, ‘product_cat’, $product->ID ) ) … Read more