Automattic / wc-calypso-bridge

20 stars 4 forks source link

Task: Update tax task to handle when the recommended plugin is installed #996

Closed daledupreez closed 1 year ago

daledupreez commented 1 year ago

Prerequisites (mark completed items with an [x]):

Issue Description:

As discussed in this Slack thread, p1677228037977309/1677175126.823349-slack-CNA89KY6M , we need to be able to detect when the AvaTax plugin is already installed, but not yet activated. When that is the case, the Tax task in the onboarding checklist needs to trigger activation of the plugin rather than redirecting out to WooCommerce.com.

Acceptance criteria

  1. Copy AvaTax from tax task in core to bridge.
  2. Detect AvaTax plugin is installed. If it is, change the CTA action to activate the plugin and then navigate to AvaTax settings screen. Otherwise, it should have the same behaviour.
daledupreez commented 1 year ago

cc @ilyasfoo

ilyasfoo commented 1 year ago

Thanks, @daledupreez. I assume we also need to bring back AvaTax to the tax task, correct?

daledupreez commented 1 year ago

Yes, that's correct, @ilyasfoo -- we are going to be installing AvaTax (but not activating it) once we land D102721-code, which should be later today.

ilyasfoo commented 1 year ago

Thanks for confirming @daledupreez, I've edited the issue to add acceptance criteria. Also, would the plugin be guaranteed to be installed? I assume there are only 2 cases we need to handle:

  1. Installed but not activated - activate and then navigate user to AvaTax settings
  2. Installed and activated - navigate user to AvaTax settings

We don't handle where the plugin is not installed.

chihsuan commented 1 year ago

Hey @daledupreez I'm working on this but getting a 403 error when I try to activate the AvaTax plugin as a free trial user.

It seems that a free trial user can't activate plugins, or there’s something that I missed?

{"code":"woocommerce_rest_cannot_update","message":"Sorry, you cannot manage plugins.","data":{"status":403}}
chihsuan commented 1 year ago

Hi @daledupreez Any thoughts on this?

daledupreez commented 1 year ago

@chihsuan, I have to relevant items: