Skip to content
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

Onboarding: Clean up unused MC settings data #2572

Closed
2 tasks
joemcgill opened this issue Aug 28, 2024 · 5 comments
Closed
2 tasks

Onboarding: Clean up unused MC settings data #2572

joemcgill opened this issue Aug 28, 2024 · 5 comments
Assignees

Comments

@joemcgill
Copy link
Collaborator

This is a follow-up to #2494. Once the MC settings related to the pre-launch policy check is removed from the API, those settings can be removed from other places that they are referenced.

The SettingsData type definition in /src/data/actions.js

* @property {boolean} [website_live] Whether the store website is live.
* @property {boolean} [checkout_process_secure] Whether the checkout process is complete and secure.
* @property {boolean} [payment_methods_visible] Whether the payment methods are visible on the website.
* @property {boolean} [refund_tos_visible] Whether the refund policy and terms of service are visible on the website.
* @property {boolean} [contact_info_visible] Whether the phone number, email, and/or address are visible on the website.

The SetupFreeListings component.

'website_live',
'checkout_process_secure',
'payment_methods_visible',
'refund_tos_visible',
'contact_info_visible',

and

https://github.com/woocommerce/google-listings-and-ads/blob/feature/2494-remove-pre-launch-checklist-items/js/src/components/free-listings/setup-free-listings/index.js#L217-L221

The relevant settings are:

  • 'website_live'
  • 'checkout_process_secure'
  • 'payment_methods_visible'
  • 'refund_tos_visible'
  • 'contact_info_visible'

Acceptance criteria

  • The settings references identified above are removed from the codebase.
  • Setting up free listings during onboarding (step 2) or editing free listings after onboarding still work as expected (no regressions).
@joemcgill
Copy link
Collaborator Author

@mikkamp we noticed this additional cleanup after #2494. Can you confirm that this looks right?

@mikkamp
Copy link
Contributor

mikkamp commented Aug 29, 2024

Yes that looks alright, in #2494 I mainly mentioned the PolicyCompliance classes which are part of the PHP side. The js parts which reference these same settings/endpoints can be removed as well, which you have listed above.

If you search for mc/policy_check you might find a few more references that could be removed, like: https://github.com/woocommerce/google-listings-and-ads/blob/2.8.4/js/src/data/resolvers.js#L173-L195

@joemcgill
Copy link
Collaborator Author

Thanks @mikkamp. I'm unsure if the resolver for the mc/policy_check endpoint can be removed, because we haven't removed that endpoint. We'll go ahead and remove the settings that we identified and if there are additional things to clean up, they could be handled in follow-up PRs.

@kt-12 kt-12 self-assigned this Sep 4, 2024
@kt-12 kt-12 assigned joemcgill and unassigned kt-12 Sep 5, 2024
@kt-12 kt-12 linked a pull request Sep 5, 2024 that will close this issue
@ankitguptaindia ankitguptaindia removed their assignment Sep 6, 2024
@eclarke1
Copy link
Collaborator

eclarke1 commented Sep 9, 2024

@joemcgill discussion ongoing here as to whether this ticket can be closed. Please advise.

@joemcgill
Copy link
Collaborator Author

joemcgill commented Sep 9, 2024

Yep, looks like this was handled in a follow-up during code review. See: #2584 (review). Closing as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants