Skip to content

Commit fcf5aa2

Browse files
authored
Merge pull request #1009 from cloudinary/hotfix/activation-hook
The plugin must have the bootstrap complete before running the activation hook
2 parents 77b10b1 + 2cbcc5c commit fcf5aa2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

php/class-plugin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ private function is_notice_component( $component ) {
422422
*/
423423
public function init() {
424424
require_once ABSPATH . 'wp-admin/includes/plugin.php';
425+
425426
$plugin = get_plugin_data( CLDN_CORE );
426427
$location = $this->locate_plugin();
427428
$this->slug = ! empty( $plugin['TextDomain'] ) ? $plugin['TextDomain'] : $location['dir_basename'];

php/class-utils.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ protected static function table_installed() {
331331
* Install our custom table.
332332
*/
333333
public static function install() {
334+
// Ensure that the plugin bootstrap is loaded.
335+
get_plugin_instance()->init();
334336

335337
$sql = self::get_table_sql();
336338

0 commit comments

Comments
 (0)