woocommerce / google-listings-and-ads

Sync your store with Google to list products for free, run paid ads, and track performance straight from your store dashboard.
https://woo.com/products/google-listings-and-ads/
GNU General Public License v3.0
45 stars 21 forks source link

Remove the billing setup page from the Ads setup flow #2536

Open joemcgill opened 3 weeks ago

joemcgill commented 3 weeks ago

Part of https://github.com/woocommerce/google-listings-and-ads/issues/2460

When a merchant is setting up a new ads campaign from the plugin dashboard, they enter the "Set up paid campaign" flow, which includes individual steps for connecting a Google Ads account, configuring a campaign, and completing their billing setup.

image

In #2535, we are replacing the second step with the same component used during onboarding, which includes the ability to set up billing if needed. That makes the "Setup up billing" step redundant and can be removed.

Acceptance Criteria

Implementation Brief

The PR should get merged into the feature/2460-simplify-paid-ads-setup branch.

The AdsStepper component for the "Set up paid campaign" flow is in js/src/setup-ads/ads-stepper/index.js. The billing step can be removed from the array passed to the steps prop here.

The handleSubmit prop that is passed via formProps to the SetupBilling component will need to be moved to the component responsible for rendering the ads campaign setup (e.g. AdsCampaign) so that step can complete the form when finished.

For testing, billing status can be mocked using the following filter in an MU plugin:

function gla_filter_ads_billing_setup_status( $status ) {
    return 'approved';
}
add_filter( 'woocommerce_gla_ads_billing_setup_status', 'gla_filter_ads_billing_setup_status' );

Test Coverage

joemcgill commented 3 weeks ago

@eason9487 could you please review this one as well. I'd like for this to be able to be worked in parallel with #2535, if possible, so we may need some follow-up once these are merged into the target feature branch.

eason9487 commented 2 weeks ago

I'd like for this to be able to be worked in parallel with #2535, if possible, so we may need some follow-up once these are merged into the target feature branch.

Since it might be realized at the time of development that they need to modify more of the same files, I'm inclined to suggest doing them sequentially.

But before considering the possibility of working in parallel, maybe the doubt in https://github.com/woocommerce/google-listings-and-ads/issues/2534#issuecomment-2306716676 needs to be clarified first as this ticket has the same situation.

joemcgill commented 2 weeks ago

But before considering the possibility of working in parallel, maybe the doubt in https://github.com/woocommerce/google-listings-and-ads/issues/2534#issuecomment-2306716676 needs to be clarified first as this ticket has the same situation.

Agreed. I'll get that verified before moving on.

joemcgill commented 2 weeks ago

I've clarified with @fblascogarma that we'll remove this step along with the first step in #2534 and consolidate the need to set up billing to the unified campaign setup screen in #2535.