get_class_instance( 'entry-db' )->create_table(); // transient is set to fix the issue related to de-activation of this plugin when WPForms is deactivated set_transient( 'plugin_activated', 'true' ); } } /** * Installation notices to show dependency on WPForms * If WPForms is not installed then this plugin is not activated * * @since 1.0.0 * */ public function installation_notices() { // if the plugin is already activated then do not deactivate it if WPForms is de-activated $plugin_just_activated = get_transient( 'plugin_activated' ); if ( $plugin_just_activated ) { return; } unset( $_GET['activate'] ); // Currently tried to activate Lite with Pro still active, so display the message. printf( '

%1$s

%2$s

', esc_html__( 'Error!!!', 'ank-wpforms-entry'), esc_html__( 'Kindly activate WPForms lite plugin before activating this plugin', 'ank-wpforms-entry' ) ); deactivate_plugins( ANK_WPFORM_ENTRY_PLUGIN_FILE ); } /** * Perform certain actions on plugin deactivation. * * @since 1.0.0 */ public function deactivate() { //TODO: Add settings options to drop table on deactivation delete_transient( 'plugin_activated' ); //$sql = $this->entry_db_instance->drop_table(); } } new Ank_WPForms_Entry_Install();