Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding admin_notices action once all dependencies are loaded. #395

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions omise-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ public function init()
{
if (!static::$can_initiate) {
add_action('admin_notices', array($this, 'init_error_messages'));
// Moving here because the class used in the function could not be found on uninstall
add_action('admin_notices', [$this, 'embedded_form_notice']);
return;
}

$this->load_plugin_textdomain();
Expand All @@ -126,6 +123,13 @@ public function init()
$this->register_ajax_actions();

prepare_omise_myaccount_panel();

// adding action after all dependencies are loaded.
if (static::$can_initiate) {
// Moving here because the class used in the function could not be found on uninstall
add_action('admin_notices', [$this, 'embedded_form_notice']);
return;
}
}

/**
Expand Down
Loading