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

Update Onbarding steps for PayPal #1491

Merged
merged 9 commits into from
Jul 19, 2024
Merged

Update Onbarding steps for PayPal #1491

merged 9 commits into from
Jul 19, 2024

Conversation

epeicher
Copy link
Contributor

@epeicher epeicher commented Jul 16, 2024

Changes proposed in this Pull Request:

Closes https://github.com/Automattic/dotcom-forge/issues/8277

This PR adds Get paid with PayPal task and removes Woo Payments task when the optionwoocommerce_onboarding_profile.partner is paypal

CleanShot 2024-07-18 at 19 40 36@2x

How to test the changes in this Pull Request:

Get paid with PayPal task

  1. Create a free trial eCommerce site for Development as indicated in these instructions peapX7-1D4-p2
  2. Install WooCommerce PayPal plugin (this will be installed automatically if the site is created through this flow https://wordpress.com/setup/entrepreneur/start?partnerBundle=paypal, but it will not be a Developer site).
  3. Update the woocommerce_onboarding_profile option using the following command wp option patch insert woocommerce_onboarding_profile partner paypal (or update if the partner property exists).
  4. Synchronize this branch with the Atomic site using the command in the parent task here, changing <your-domain> with the domain of your host. Or you can use the following instructions to synchronize the wc-calypso-bridge plugin to the atomic site: Pe5pgL-2eX-p2
  5. Go to WooCommerce -> Home
  6. Confirm Get paid with PayPal task exists.
  7. Click on it.
  8. You should be redirected to PayPal connect wizard.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

Copy link

github-actions bot commented Jul 16, 2024

Size Change: +128 B (+0.06%)

Total Size: 201 kB

Filename Size Change
./build/index.js 126 kB +128 B (+0.1%)
ℹ️ View Unchanged
Filename Size
./build/53.js 1.08 kB
./build/index.css 878 B
./build/marketing.js 58.3 kB
./build/payment-gateway-suggestions.css 1.24 kB
./build/payment-gateway-suggestions.js 6.57 kB
./build/plugins.js 3.93 kB
./build/style-index.css 2.15 kB
./build/style-marketing.css 800 B

compressed-size-action

@epeicher epeicher marked this pull request as ready for review July 18, 2024 17:47
@epeicher epeicher requested review from ilyasfoo and moon0326 July 18, 2024 18:28
@epeicher
Copy link
Contributor Author

epeicher commented Jul 18, 2024

Hi @ilyasfoo , @moon0326 , I have created this PR based on #1426 but I have updated the testing instructions a bit as I was not able to reproduce them exactly. I have removed the Feed Removal section.

Could you please review the PR and let me know any comments? Please note that I am not very familiar with this codebase so be thorough in your review 😉 Thanks!

Copy link
Contributor

@moon0326 moon0326 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @epeicher 👍

I think we should make a shared class for remove_woo_payments_from_payments_suggestions_feed and remove_payments_note functions when we get more payment tasks later on.

Other than that, LGTM and tested well 🚀

@JulianBustamante
Copy link
Contributor

Thank you, @moon0326 for reviewing.

I think we should make a shared class for remove_woo_payments_from_payments_suggestions_feed and remove_payments_note functions when we get more payment tasks later on.

Agree! We can work on this on a follow-up task.

@epeicher epeicher merged commit 4f6426a into master Jul 19, 2024
8 checks passed
@epeicher epeicher deleted the add/paypal-partner branch July 19, 2024 09:06
*/
public function __construct() {
// Only for free trials.
if ( ! wc_calypso_bridge_is_ecommerce_trial_plan() ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid using the wc_calypso_bridge_is_ecommerce_trial_plan condition. In the future the plan provisioned might not be a trial. Also, the behaviour should only be dictated by the $onboarding_profile['partner'].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a key point to consider. We included that condition to avoid diverging from the original implementation, but I soon realized that it would need an update if the creating flow changes at any point, which is indeed very likely. And I totally agree with you that it should only depend on the onboarding_profile option.

What do you think about considering this when updating the process to be more dynamic, context here: p1721665079790669-slack-C02JPCHEKDY? Or do you think that we should instead remove this condition before shipping this iteration?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it in a clean up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task created to avoid forgetting this:

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 this pull request may close these issues.

4 participants