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

Create the database tables if they do not exist when resetting the DB #1285

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions classes/class-admin.php
Expand Up @@ -673,6 +673,9 @@ public function wp_ajax_reset() {
esc_html__( "You don't have sufficient privileges to do this action.", 'stream' )
);
}

// Create and update the database tables if they do not exist.
$this->plugin->install->check();
Copy link
Contributor

@kasparsd kasparsd Sep 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check here defined( 'DOING_AJAX' ) && DOING_AJAX going to stop this particular call from doing anything?

if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦🏻 I wouldn't have noticed without your help :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think $this->plugin->install->install( $this->plugin->get_version() ); might make more sense?


$this->erase_stream_records();

Expand Down