google-listings-and-ads icon indicating copy to clipboard operation
google-listings-and-ads copied to clipboard

Remove the billing setup page from the Ads setup flow

Open joemcgill opened this issue 1 year ago • 4 comments

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

  • [ ] The "Setup up billing" step is no longer included in the AdsStepper.
  • [ ] When billing is already set up, completing the "Create your paid campaign" step should result in the Setup Paid Ads flow being completed successfully with a new campaign.

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

  • Jest tests will be updated as a follow-up task at the completion of #2534, #2535, and this issue.
  • E2E tests related to the billing step can be removed from here.
    • Tests related to completion of the campaign should be retained as a standalone test. (current example)

joemcgill avatar Aug 16 '24 21:08 joemcgill

@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.

joemcgill avatar Aug 22 '24 20:08 joemcgill

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.

eason9487 avatar Aug 23 '24 10:08 eason9487

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 avatar Aug 26 '24 23:08 joemcgill

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.

joemcgill avatar Aug 28 '24 18:08 joemcgill

E2E for this task is fixed. This is good for WooCR but currently blocked by a strange error in GH action. https://github.com/woocommerce/google-listings-and-ads/actions/runs/11057375294/job/30725249745

kt-12 avatar Sep 27 '24 08:09 kt-12

@eason9487 looks like this error has now been fixed.

joemcgill avatar Sep 27 '24 21:09 joemcgill

Closing this as completed since it was part of the 2.9 release.

mikkamp avatar Dec 02 '24 15:12 mikkamp