* Wizard: Remove extra query arg in next step URL
Remove the activate_error query arg from
the URL for the next step.
* Wizard: Remove temp queued Jetpack install option
This is done so that the option does not remain
when going through the wizard again, or when going
back to previous pages.
It prevents an infinite loop from happening when
waiting for the Jetpack install and activation
to finish on the activate step.
* Wizard: Install and activate Jetpack if needed
Add function to install & activate Jetpack as needed.
Props to @jeffstieler for the idea, and the implementation/code:
https://github.com/Automattic/woocommerce-services/pull/1031#discussion_r122505316https://github.com/Automattic/jetpack/blob/master/3rd-party/woocommerce-services.php#L101
Add a list of errors and a function to get the correct error message.
After clicking the connect Jetpack button, make sure that
Jetpack is installed and activated.
On error, redirect to the activate page with a query arg.
* Wizard: Show Jetpack error message if it exists
Always check for an error message when displaying
the activate step. If the error
message exists, display it at the top of the page.
* Remove redundant "if" so the $title in the Activate step is always a valid string
* Tweaked the "Server is on a private network" Jetpack activation error message.
- Update style
- Use new reusable class 'wc-wizard-services' instead of
'wc-wizard-payment-gateways'
- Update JS script for toggling checkboxes
- Update payment gateways: in-cart and manual
- Update POST variable names in save function