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.

Activate Plugin Automatically After Set Time

Add this to the functions.php file of your active (child) theme- add_action( ‘init’, ‘wpse_393267_activate_plugin’ ); function wpse_393267_activate_plugin() { if( !function_exists( ‘is_plugin_active’ ) ) { include_once ABSPATH . ‘/wp-admin/includes/plugin.php’; } $plugin_to_activate=”jetpack/jetpack.php”; // plugin-dir/plugin-file.php $date_to_activate=”2021-08-13″; // YYYY-MM-DD if( is_plugin_active( $plugin_to_activate ) ) return; if( time() >= strtotime( $date_to_activate ) ) { activate_plugin( $plugin_to_activate ); } } Change … Read more