Skip to content

Commit 2574c5a

Browse files
authored
Load the plugin functions during simulation
Fixes #15
1 parent c7f4c33 commit 2574c5a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bin/simulate-plugin-use.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@
3939
*/
4040
require $simulation_file;
4141

42+
/**
43+
* Load the WordPress plugin functions.
44+
*
45+
* These are usually only loaded in the admin, so we need to load them manually here.
46+
*
47+
* @since 0.2.3
48+
*/
49+
require_once ABSPATH . '/wp-admin/includes/plugin.php';
50+
4251
// Deactivate the plugin.
4352
deactivate_plugins( $plugin_file, false, $network_wide );
4453

0 commit comments

Comments
 (0)