Skip to content

Comments

Disconnect Jobber account when plugin is deactivated#51

Merged
dkotter merged 2 commits intodevelopfrom
add/plugin-deactivation
May 22, 2025
Merged

Disconnect Jobber account when plugin is deactivated#51
dkotter merged 2 commits intodevelopfrom
add/plugin-deactivation

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented May 21, 2025

Description of the Change

We currently have disconnect functionality in place that can be manually triggered from our settings page. But if someone connects their account and then deactivates the plugin, their site is technically still connected to Jobber.

This PR fixes that by adding a deactivation hook that will fire off the disconnect functionality.

Closes #50

How to test the Change

Because the disconnect functionality requires communication back and forth between the site and the middleware, this will only work if your site is publicly accessible (I tested locally using ngrok). If wanting to test the entire flow, follow the steps below:

  1. Connect your site to Jobber
  2. Go to your Jobber account and ensure the app is showing as connected: https://secure.getjobber.com/marketplace?nav_label=Apps&nav_source=sidebar
  3. Deactivate the plugin
  4. Ensure the app no longer shows as connected within your Jobber account

Changelog Entry

Added - Disconnect your Jobber account when the plugin is deactivated

Credits

Props @dkotter

Checklist:

@dkotter dkotter added this to the 1.0.0 milestone May 21, 2025
@dkotter dkotter self-assigned this May 21, 2025
@github-actions github-actions bot added the needs:code-review This requires code review. label May 21, 2025
@dkotter dkotter requested a review from faisal-alvi May 21, 2025 20:07
Copy link
Contributor

@faisal-alvi faisal-alvi left a comment

Choose a reason for hiding this comment

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

@dkotter Thanks for the work here! Tests well.

@dkotter dkotter merged commit 1eab2a1 into develop May 22, 2025
7 of 8 checks passed
@dkotter dkotter deleted the add/plugin-deactivation branch May 22, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jobber Disconnection on Uninstall

2 participants