How to remove a hook written with $this?
$this refers to the class “WeDevs_Dokan” most likely. Replace: remove_action( ‘dokan_new_product_after_product_tags’, array( $this, ‘add_product_brand_field’ ) ); With: remove_action( ‘dokan_new_product_after_product_tags’, array( ‘WeDevs_Dokan’, ‘add_product_brand_field’ ) ); And see if that works. Sometimes classes are namespaced, so check the file to see if that’s the case and include that before the WeDev_Dokan string.