Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [activation]

The tag has no usage guidance.

-1
votes
1answer
20 views

explanation for activate_plugin function in wordpress core

This function is in plugin.php file in wordpress core. I read the code and didn't get quietly what does it do. Can anyone give some explanation for this function?
0
votes
1answer
24 views

Activate User account for Sub Site broken

When I add a new user to a WP Multisite sub-site, an email is sent out asking the user to click a link to activate. The link looks like this: https://website.com/subsite/wp-activate.php?key=XXXXXXXXX ...
0
votes
0answers
20 views

Custom Plugin activation error in Multisite

I have created one custom plugin but when i try to Network Active in multisite its generate error like below But when i install plugin from individual admin its successfully activated. Any help is ...
0
votes
1answer
58 views

Redirect after plugin activation

I am not a techy guy so please explain in simplest ways how can i solve this problem . When i install a plugin ( it does not matter which plugin) and then press to activate it , it redirects me to ...
0
votes
1answer
190 views

Cannot modify header information - headers already sent during plugin activation

I am getting this error PHP Warning: Cannot modify header information - headers already sent by (output started at /home/zk2ba8xn663w/public_html/wp-includes/formatting.php:5100) in /home/...
0
votes
1answer
35 views

Redirect to custom admin menu after plugin activation

I believe i have to add this to my plugin to redirect after plugin activation as per https://wordpress.stackexchange.com/a/178504/145078 register_activation_hook(__FILE__, 'nht_plugin_activate'); ...
0
votes
1answer
36 views

Is it possible to send user new password after they clicking on forgot password in word press

In word press is it possible to send users to new password after they are clicking on forgot password page ? Actually I dont want to send any url to users email which can take them to any page. Also ...
0
votes
1answer
43 views

How to properly setup an activation hook

I am trying to register an activation hook for my plugin. The plugin is using classes and the actual activation method is held in a separate admin class. Reading the documentation for ...
2
votes
1answer
35 views

Wordpress register_activation_hook table creation not working

I've created a simple Class for my wordpress plugin. The main file looks like this: <?php /* * Plugin Name: Codes * Description: Generates a coupon code after checkout * Version: 0.1.0 * ...
2
votes
1answer
60 views

Plugin activation error due to unexpected output

I am getting the following error when I activate my plugin: The plugin generated 22 characters of unexpected output during activation. If you notice “headers already sent” messages, problems ...
0
votes
1answer
221 views

Plugin won't activate - cannot declare class (already in use)

I have no idea what I'm doing. I'm using the WordPress Plugin Boilerplate When activating my blank plugin, I receive the following error. Fatal error: Cannot declare class Requests, because the name ...
1
vote
0answers
24 views

Use an activation code to change a role [closed]

Wonder if you can help me. I'm making a website based on accounts and a subscription for content control. At the minute, the way activation of a paid account works, is the user buys a subscription via ...
1
vote
1answer
38 views

Settings not set after calling register_setting()

I have a plugin with an activation hooked function. This function has to register 4 setting variables. I can't see why, but only the first setting is registered correctly, the last 3 are somehow ...
3
votes
2answers
46 views

Function to activate WordPress theme inside a plugin

I am creating a plugin that generates a theme, and so I want to have a checkbox at the end of the theme generation process that gives the possibility to activate the freshly created theme without ...
1
vote
1answer
62 views

Detect when any plugin is activated or deactivated

I have a starter theme I use for most websites I built myself. Because each site has different plugin dependencies, I'm trying to create a script that essentially collates a list of all plugins ...
1
vote
1answer
32 views

Is any information available in PHP files in WP about plugin activation history?

I want to identify the plugin names earlier activated on my WordPress site.
1
vote
0answers
23 views

Are functions in main plugin file called before function bound to register_activation_hook runs?

In my plugin, I am doing a minimum-supported PHP version compatibility check via a function bound to register_activation_hook and halting activation for those on PHP version less than the minimum ...
0
votes
1answer
37 views

Sub Plugin deactivation when Parent Plugin deactivate

I have created sub plugin of woocoomerce.How I can deactivate the subplugin when woocoomerce is deactivate.
-2
votes
1answer
29 views

Install theme as part of a plugin

I know that you can install plugin code as part of a theme, but I would like to do it the other way round. I'm developing a plugin that does a lot of non-public things, but I would also like to bundle ...
1
vote
1answer
433 views

Correct way to use register_activation_hook

Hi I am developing a plugin and got stuck at one point. I have tried exploring different forums as well as WordPress codex but its not 100% clear. Can anyone help me understand how ...
0
votes
1answer
293 views

Advanced WordPress plugin activation detection

I'm testing the plugin activation detection because something went wrong in my plugin. I discovered the problem, but didn't understand it: I'm trying to check for plugins activation (others and my ...
0
votes
2answers
226 views

How can I manually activate a new site in a wordpress multisite network?

A client signed up for a new site in my multisite network. But, didn't finished the activation because they never received the email to verify and register. As the network administrator, I don't see ...
0
votes
1answer
25 views

Custom Table doesn't create on plugin activation

I'm a newbie in plugin development. I tried following this documentation: https://codex.wordpress.org/Function_Reference/register_activation_hook I've created a function on the main plugin file (wp-...
3
votes
0answers
63 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. ...
0
votes
1answer
33 views

How to store in the database directly the translation?

I would like to store my custom posts with the correct translation when the user activate the plugin. $a_custom_post = array( 'post_type' => "foo-page", 'post_status' ...
1
vote
4answers
892 views

How to create a page when a theme is activated?

I want my theme to have an 'about' page available by default when a user uses my theme. Is there a way to auto create a page when a user selects your template? Or some other way of achieving this?
1
vote
1answer
48 views

Force file download on plugin activation

I am writing a plugin and want to force users to download a file immediately when they activate the plugin. Here is the code that I've written so far but doesn't work. No fatal errors but gives ...
1
vote
0answers
55 views

What is the correct way of updating wordpress options

I've added some codes to my theme's function so when I activated the theme, it will update the category base, permalinks, and post_per_page, and they worked perfectly fine. However, since I'm just ...
1
vote
1answer
6k views

Send activation email to user after signup [duplicate]

I would like to send an email to all users immediately after they signup that requires them to click a link inside that email to "activate" their email address. Ideally each user account would have ...
2
votes
1answer
24 views

Cannot run the code after I activate the plugin

I wrote a plugin to write code into the wp-config.php – it should download a code file and add it to my wp-content. But I only can run the function manually. I want the plugin to run the function when ...
0
votes
1answer
18 views

On local machine can't log in or reset password but I can log in on the live version, user has activation key in database

I'm working on a local copy of a site that is online and I can't log in or reset password for my user and I can't figure out why. I can click to reset the password with the "forgot password" button ...
0
votes
1answer
153 views

Unable to show a message after plugin activation

Based on: https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices My actual code class Activation { function __construct() { add_action( 'admin_notices', array($...
0
votes
3answers
2k views

Unable to activate wordpress importer after installing it

After installing wordpress importer from Tools option in wordpress, when I try to activate it, it gives fatal error. The relevant php code: class WXR_Parser { function parse( $file ) { //...
2
votes
1answer
440 views

Multisite: Activate plugin for subsites only?

For some plugins, I'm trying to activate only for subsites. Lets say the plugin is "Contact Form 7" and I need it activated only on subsites. If activate on Network Admin, it will activated on main ...
0
votes
2answers
771 views

why creating tables using $wpdb is not being executed while installing plugins?

This is the code below I am using to create a table when installing plugin. But, I tried many ways and for some reason it is not working. Is there any other efficient way of doing this? Please Help, ...
0
votes
1answer
795 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.
4
votes
2answers
4k views

Login email after registration never sent or received

On my site, after a user registers they receive an email with an activation link. When clicking the activation link, sometimes the page doesn't load, sometimes it does (usually if I click the link ...
5
votes
1answer
613 views

__NAMESPACE__ with register_activation_hook

Im teaching myself namespaces and OOP in wordpress at the moment so bare with me. In the base of my plugin I'm loading activation and deactivation hooks. Currently the deactivation hook works but ...
0
votes
1answer
122 views

A question about register_activation hook

Looking at wp codex it says: The register_activation_hook function registers a plugin function to be run when the plugin is activated. I am finding this to be not entirely correct, for example i can ...
1
vote
1answer
392 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 ...
1
vote
1answer
270 views

Insert terms for custom taxonomy on plugin activation, or each page load (init hook)

Consider a plugin which adds a custom Taxonomy and then fills the taxonomy with a large term hierarchy (tens of hierarchical terms, may become hundreds in specific installations). I understand that ...
0
votes
1answer
444 views

WordPress user account activation

How do I implement user account activation in WordPress? (This is not for multisite.) Once the user registers through the site or admin panel, the user should get an email with an activation link. ...
0
votes
1answer
62 views

Activation of new Registered site fails on multisite

I recently installed multisite to my main site. I put a registration link at the top of my page. I tried registering a new site and user. The steps were straight forward with username, email, and ...
0
votes
1answer
138 views

Error Copying Directory On Plugin Activation

I am trying to copy directory using WP_Filesystem API with the method copy_dir() on plugin activation, but it is give me the following error message: Plugin could not be activated because it ...
0
votes
0answers
52 views

Users set passwords but cannot login

I'm working on a WP-based site that requires creating accounts for users and sending them their password reset links by email so they can activate their accounts. After manually sending out all the ...
0
votes
1answer
55 views

Wordpress hook source

I am trying to understand how plugins are activated. wp-admin\includes\plugin.php, line 602, there is a call to run a hook called activated_plugin do_action( 'activated_plugin', $plugin, $...
5
votes
1answer
807 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 ...
0
votes
1answer
49 views

API calls on plugin activation or init?

When I activate my plugin, I need to call an API, to get some items, lets say fruits, flowers and animals. I need to create taxonomy terms out of these items. Then I need to loop over these items and ...
1
vote
3answers
1k views

How to activate plugins for my WordPress sites from a remote server

I have been thinking of managing a set of wordpress sites from a remote server.I would like to get information on plugins that has been installed on my wordpress sites.I would also like to install ...
14
votes
4answers
46k views

Activate a plugin through PHPMyAdmin or FTP?

I've just disabled a plugin on my site and it's now giving me the dreaded white screen of death. I know the site will be fine if I reactivate the plugin. Is there a way to manually activate a plugin ...