-
Notifications
You must be signed in to change notification settings - Fork 4
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
Replace WCS&T tax onboarding with Woo Tax onboarding. #1462
base: master
Are you sure you want to change the base?
Conversation
Add Woo Shipping & Woo Tax install functions to Addons page override for when core introduces this. Surpress Woo Shipping & Woo Tax messaging from WC core when they get added.
Size Change: -55 B (0%) Total Size: 197 kB
ℹ️ View Unchanged
|
@@ -17,7 +17,7 @@ import { TaxChildProps } from '../utils'; | |||
export const Card: React.FC< TaxChildProps > = () => { | |||
return ( | |||
<PartnerCard | |||
name={ __( 'WooCommerce Tax', 'woocommerce' ) } | |||
name={ __( 'WooC Tax', 'woocommerce' ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this one should be Woo Tax
?
I was also unsure but found you need to upgrade away from a trial site for this to show. Also noticing some of the text are not reflecting the updates, might be due to the sync/build process not generating new po/mo files
That would be fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌 PHP Side of things look good - As I mentioned, I couldn't manual test the process
Minor comments
Make sure that all edited PHP files that have an @version
header, it should be
* @version x.x.x
so when you do a release, replace it with the actual version.
You'd also need an entry in readme.txt
See @waclawjacek 's PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @kloon! Apologies for the delays in reviewing!
I assume we do not expect the Tax task to install/activate woocommerce-tax
plugin? This is because we've removed the install/activate plugins step for bridge (ref), and it could only install plugins listed in wp.org.
I tested and it seems the task is not marked as complete since we've changed the option from wc_connect_taxes_enabled
. Otherwise, I think everything else is working as intended
'repo-slug' => 'woocommerce-tax', | ||
); | ||
|
||
WC_Install::background_installer( $services_plugin_id, $services_plugin ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're already aware, but just precaution that background_installer only supports wp.org listed plugins, in case we're releasing this prior making the plugin public.
@@ -57,9 +57,9 @@ export const Plugins: React.FC< SetupStepProps > = ( { | |||
nextStep(); | |||
}, [ isResolving ] ); | |||
|
|||
const agreementText = pluginsToActivate.includes( 'woocommerce-services' ) | |||
const agreementText = pluginsToActivate.includes( 'woocommerce-tax' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the Plugins
component isn't used since we're expecting bridge to always have woocommerce-services
installed (Removal commit). Let me know if installing plugin in the task is required!
@@ -112,7 +112,7 @@ export const Tax: React.FC< TaxProps > = ( { onComplete, query, task } ) => { | |||
updateAndPersistSettingsForGroup( 'tax', { | |||
tax: { | |||
...taxSettings, | |||
wc_connect_taxes_enabled: 'no', | |||
woo_tax_taxes_enabled: 'no', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the Tax task uses wc_connect_taxes_enabled
option to determine its completion status (ref).
In order to support the new option, we'll need to override the default Tax task class, here's ab example of how we did it for Products task: https://github.com/Automattic/wc-calypso-bridge/pull/963/files.
Changes proposed in this Pull Request:
Replace the WCS&T Tax onboarding with just Woo Tax.
These changes form part of the work to roll out the new Woo Shipping and Woo Tax to WooExpress sites.
How to test the changes in this Pull Request:
Testing instructions taken from #975
Test Woo Tax
Click on "Yes please" and observe that you're redirected to Homescreen with Tax task completed
Go to WooCommerce > Settings > Tax
Observe that you have Enable automated taxes selected in the Automated taxes dropdown
Go to WooCommerce > Home > Tax task
Click on No thanks, I'll set up manually and observe that you're redirected to tax settings screen
Go to WooCommerce > Home > Tax task
Click on I don't charge sales tax
Observe that you're redirected to Homescreen with Tax task completed
Test manual configuration
Go to WooCommerce > Settings > General
Remove all address fields, set store country to "Malaysia - Johor" and save
Go to WooCommerce > Home > Tax task
Fill in all store address fields in Set store location and click on continue
Click on Configure and observe that you're redirected to tax settings
Go to WooCommerce > Settings > General
Observe that the store address values are saved from the values inserted in the previous form
Other information:
FOR PR REVIEWER ONLY: