Questions tagged [deactivation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

Is there a canonical way for a plugin to install a mu-plugin or drop-in?

I have a couple of plugins that need to install drop-in modules or mu-plugin modules when they're activated, and remove them when they're deactivated. This requires copying -- or maybe symlinking -- a ...
O. Jones's user avatar
  • 471
0 votes
1 answer
34 views

Solution to White Screen of Death that does not require Web Server access?

I'm working on a live website, updated a plugin and got the dreaded White Screen of Death. I know exactly how to resolve the problem; simply deactivate or delete the plugin I upgraded. The problem is ...
sazr's user avatar
  • 357
1 vote
1 answer
263 views

When I deactive WooCommerce Plugin, I want to take a action in My plugin

I have a WordPress plugin which is dependent on WooCommerce. When a user uninstalls or deactivates the WooCommerce plugin, in this time, I mean when WooCommerce plugin register_deactivation_hook, I ...
Abdullah Mahi's user avatar
0 votes
0 answers
60 views

How do I disable Pods/Elementor while using Ninja Forms?

There's a conflict when using Pods, Elementor, and Ninja Forms together. This is a known issue by Ninja but the other players are uncooperative and Ninja is still a little ways out on a real fix. The ...
dovidev's user avatar
  • 121
1 vote
1 answer
57 views

Prevent a plugin from being automatically activated

On a site I look after, the hosting company automatically force a plugin on us that, well it's useless. I'm looking for a hook/action that can be used to fully prevent that plugin from being ...
rich's user avatar
  • 156
0 votes
1 answer
216 views

Wordpress Plugin Activate / Deactive Failing

Below is my plugin.php file that would install into wp-content <?php // If this file is called directly, abort. namespace Booker; if ( ! defined( 'WPINC' ) ) { die; } /** ...
Narrim's user avatar
  • 133
0 votes
0 answers
31 views

Is there an option to execute javascript file only on plugin deactivation

I'm creating a custom plugin for WordPress and I'm trying to execute javascript file only on plugin deactivation. I'm using register_deactivation_hook() and wp_enqueue_script() to execute file only ...
upss1988's user avatar
0 votes
0 answers
110 views

Unset plugins on front-end belonging to specific category

I have a function which unset plugins on the front-end. The only extra criteria, in_category ( 'my-cat-name' ), I am not able to achieve. Where and how to add the category so the plugins are only ...
Jerry.S's user avatar
  • 140
1 vote
4 answers
483 views

Deactivate Plugin on Theme Switch

I am developing a plugin, let's call it DahPlugin, that provides additional customizer options for a free theme I developed. Let's call this theme DahTheme (I don't want to shamelessly plug either one ...
tsquez's user avatar
  • 85
0 votes
1 answer
400 views

is_active_sidebar() problem

I'm trying to develop a wordpress theme with a hero slider, I use some 3rd party slider widget inserted to the hero widget area I've defined as sidebar-hero in my functions.php file. I'm using this ...
tpaksu's user avatar
  • 150
8 votes
2 answers
2k views

Must activation/deactivation functions in a class be static?

The description for register_uninstall_hook's $callback parameter states: Must be a static method or function.1 There is no such comment for register_activation_hook or register_deactivation_hook. ...
Spencer's user avatar
  • 256
2 votes
1 answer
243 views

OOP: Display warning and deactivate the plugin if PHP version is less than 5.4

I want to show a notice to the user and deactivate my plugin, using OOP code style, if the user has a PHP version less than 5.4. The code works fine when I create my plugin using non-OOP. It shows an ...
Kamal Ahmed's user avatar
1 vote
1 answer
2k views

How to automate wordpress plugin activate and deactivate by php logic?

Is it possible to build logic to control the activation and deactivation of specific wordpress plugins , for example Activation/Deactivation triggered by time period? thanks for knowledge sharing.
BOBO's user avatar
  • 148
1 vote
1 answer
1k views

disable active plugins for specific theme

I want to disable some plugins from a specific theme.I am using deactivate_plugins hook to deactivate. following is my code. add_action('wp_head','disable_plugins'); function disable_plugins(){ ...
Bhuvnesh Gupta's user avatar
1 vote
2 answers
1k views

Remove Action from Plugin within extended class and no assigned variable

I have tried so many solutions for this but I can't figure it out. Here is a simplified version of the plugin code: class YITH_Vendors_Frontend_Premium extends YITH_Vendors_Frontend { public ...
Daniel Klose's user avatar
1 vote
1 answer
982 views

Plugin Deactivate Self on Activation Errors

Hi I'm wondering if someone can point me in the right direction here. I'm having trouble figuring out how deactivate_plugins() works. I've been using variations of the below for awhile now and it's ...
Bryan Willis's user avatar
  • 4,399
6 votes
1 answer
1k views

How to Modify/Change a Buddypress/Wordpress Account Activation Process

I'm developing a custom BuddyPress/WordPress Plugin. Here's how a user would normally register. A user registers as usual on registration page His/Her account is deactivated till he/she clicks on ...
William Oneb's user avatar
0 votes
1 answer
658 views

Deactivate a plugin on wp version

I've creating a theme options page at the moment and was playing around with this function deactivate_plugins() I'm running wordpress 3.8.3 so running this code in my plugin should uninstall it. ...
Dannyw24's user avatar
0 votes
0 answers
64 views

Different plugins activated online and offline

I develop / add to / etc. my site offline, then transfer the updated database (in toto) to the live site. Some of the plugins I need / use offline, I don't need online, and vice versa. Is there a way ...
Kevin4fm's user avatar
2 votes
2 answers
2k views

Show a confirmation message on plugin deactivation

When my plugin is deactivated, I want to get a confirmation from the user whether all plugin options/tables need to be deleted or left as it is. Based on the option selected, I want to proceed further....
Navin Nagpal's user avatar
1 vote
1 answer
60 views

Turn on and off custom post type from admin?

Is it possible to "deactivate" a custom post type and then later if you feel like using it again you can simple "activate" it again?
Anders Kristoffersson's user avatar
0 votes
1 answer
75 views

WPMU If MU site has no administrator, deactivate site

So I been tinkering with this thought. Working w/ WooCommerce Subscriptions - if the user is a recurring paid member, they can create and manage their own subsite. However, say the recurring payments ...
Roc's user avatar
  • 463
0 votes
2 answers
4k views

Reset Roles (or undo role changes on theme change)

I am creating a theme that deletes some user roles that are not necessary and creates others. (It deletes author and contributor and renames subscriber). Everything works, but on theme deactivation, ...
The Salt's user avatar
  • 193
5 votes
2 answers
20k views

Disable WooCommerce action

I'm customizing a WooCommerce theme and am going to be moving the title. There is an action in content-single-product.php called: do_action( 'woocommerce_single_product_summary' ); in the ...
Anagio's user avatar
  • 953
1 vote
1 answer
7k views

Why my Plugin keeps deactivating automatically?

I have a plugin called 'virtual theme' which I downloaded from the plugin directory, and it works great but i noticed sometimes when there's a change it with other plugins it seems to stop working and ...
Alex Pena's user avatar
1 vote
1 answer
2k views

Can a plugin deactivate itself?

We have a situation where a couple of our longstanding plugins (Google Analytics is one) are currently offering the option to "Activate" them. This figures, because Google Analytics traffic stopped ...
hawbsl's user avatar
  • 500
0 votes
3 answers
236 views

Is it possible to run javascript on plugin deactivated?

Is it possible to run javascript on plugin deactivated and if yes then, how should I achieve that. I have developing one plugin in which two new tables are created in wp database and on deactivation ...
Krishna's user avatar
0 votes
2 answers
345 views

How to deactivate my plugin upon deactivation of NextGen

i'm writing this plugin and i need to deactivate it when NextGen is deactivated: <?php /* Plugin Name: Plugin Name Description: Description Version: 1.0 Author: Author Author URI: Author URI */ //...
Ivano Mercuri's user avatar
0 votes
1 answer
82 views

My plugin does not install correctly if a previous version is still installed

My plugin only installs correctly if the user first deactivates and then deletes a previously installed version. If they do not delete the previous version, the installation either does not complete ...
josh's user avatar
  • 113
1 vote
3 answers
2k views

how to deactivate a plugin without using a WP function?

I wish to deactivate my plugin, but WITHOUT using update_option() or any other core WP function. What's the best way to go about this? Direct DB connection and modification?
JVC's user avatar
  • 461
2 votes
1 answer
2k views

Displaying a message when plug-in is deactivated

I'm using the following code to deactivate my WordPress Plugin if the requirements are not met public function activate() { if (!$this->check_requirements()) { ...
Omar Abid's user avatar
  • 416
1 vote
2 answers
211 views

Do you clean up your self-written plugins' at deactivation?

After developing some plugins for myself, some of them is ready to be published. For all, I've written deactivation functions, which deletes the set options, the database, etc. after themselves. But I'...
petermolnar's user avatar
  • 1,013
3 votes
2 answers
4k views

Deactivate plugin upon deactivation of another plugin

Wondering if its possible to deactivate a plugin in the deactivation code of another plugin? IE. i have a widget that i'm adding via its own plugin that won't function if the 'master' plugin isn't ...
Peter Gibbons's user avatar
108 votes
2 answers
61k views

Uninstall, Activate, Deactivate a plugin: typical features & how-to

I'm making a WordPress plugin. What are typical things I should include in the uninstall feature? For example, should I delete any tables I created in the install function? Do I clean up my option ...
redconservatory's user avatar