Skip to content

Conversation

@oaratovskyi
Copy link
Contributor

@oaratovskyi oaratovskyi commented Sep 5, 2022

All Submissions:

Changes proposed in this Pull Request:

The changes in this pull request add the additional payment methods, such as PayPal, AmazonPay, Klarna, and Affirm to the WC Payments welcome page (experiment). If toggled, it allows installation of those extensions alongside with WCPay.

Implemented the following items according to the design (7QOkvxzz1ylS3QBS4zqW8R-fi-10292%3A40323):

  • Added a new Additional Payment Methods block to the WC Payments welcome page experiment.
  • Removed the big FAQ block and left only a small row - Get in touch if the user has more questions.
  • Added a wcpay_extension_installed event on Install button click.

Closes Automattic/woocommerce-payments#4529.

Important: installation of the Affirm plugin is not possible yet, because it is absent in wp.org. There is an ongoing discussion here (pc2DNy-166-p2). For now, it's out of scope (paJDYF-4Ov-p2#comment-13959).

How to test the changes in this Pull Request:

  1. Comment out the following lines and build the zip from this branch.
  2. Create a website using https://jurassic.ninja/specialops/ (include only WC Payments Dev Tools, remove Jetpack that is enabled by default)
  3. Go to WC Payments Dev Tools and unclick the Proxy WPCOM requests checkbox and save (otherwise we'll have issues like can't resolve docker.internal)
  4. Install the WooCommerce plugin from the built zip
  5. Activate it and pass the WooCommerce onboarding (don't Install WCPay - untick Add recommended business features to my site on the step 4)
  6. Choose Storefront theme, since it's the most popular one
  7. Enable the tracking in settings (Woocommerce -> Settings -> Advanced -> WooCommerce.com : Allow usage of WooCommerce to be tracked)
  8. Then visit /wp-admin/admin.php?page=wc-admin&path=%2Fwc-pay-welcome-page
    Make sure it looks like at the screenshot below and matches the design
    image
  9. Check the toggles: click on each toggle and observe as the notice above appears and the text changes depending on the enabled plugins. Notice shouldn't appear if all toggles are off.
    image
  10. Tick paypal, amazonpay and klarna, click Install. The extensions should be installed alongside WC Pay.
  11. Approve Jetpack prompt
  12. Complete Stripe KYC, you'll be redirected to payments overview screen. Verify that promotion was applied.
  13. Verify that all the selected plugins were installed
  14. Check that wcadmin_wcpay_extension_installed event was recorded (after 5 mins when tracking event will show up)

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?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm changelog add --filter=<project>?

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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2022

Test Results Summary

Commit SHA: 62467e9

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests11800201201m 2s
E2E Tests185002018713m 53s
To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

- Add valid links to each APM
- Add valid link to the marketplace
- Add valid links to each APM
- Add valid link to the marketplace
- Style a notice about APM is enabled
- Add noreferrer and target=_blank to external links
@oaratovskyi oaratovskyi dismissed a stale review via 0b7935b September 13, 2022 13:19
@github-actions github-actions bot added the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Sep 13, 2022
@github-actions github-actions bot removed the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Sep 13, 2022
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Sep 13, 2022
@oaratovskyi oaratovskyi marked this pull request as ready for review September 13, 2022 14:33
@oaratovskyi oaratovskyi self-assigned this Sep 13, 2022
@oaratovskyi oaratovskyi requested review from a team and dmallory42 and removed request for a team September 13, 2022 15:04
@oaratovskyi
Copy link
Contributor Author

A couple of questions need to be resolved before the review

  • p1663081329886189-slack-C03PGHYA8TG
  • pc2DNy-166-p2

Copy link
Contributor

@dmallory42 dmallory42 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @oaratovskyi! It's looking really good. I left a few minor comments, and also messaged you on Slack to ask some questions about testing instructions. When I can test it and you've had a chance to look at the comments I can approve! 🙂

@github-actions github-actions bot added the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Sep 15, 2022
@github-actions github-actions bot removed the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Sep 20, 2022
@oaratovskyi oaratovskyi requested a review from a team September 20, 2022 19:45
Copy link
Contributor

@ismaeldcom ismaeldcom left a comment

Choose a reason for hiding this comment

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

Great work! 🙂 I left some nitpicks after reviewing everything. Apart from that, I also want to double-check why I don't see a gap between the new cards. Makes sense to me, because we're not adding it explicitly to the new classes. But I wonder why on your screenshots it looks good 🤔

Screenshot 2022-09-21 at 10 35 22

return createInterpolateElement(
sprintf(
__(
'Installing <strong>WooCommerce Payments</strong> will automatically activate <strong>%s</strong> %s in your store.',
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a "translators" comment like this? Thanks!

/* translators: %s = name of the product having stock updated */

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thank you! Will add that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 579b1d6!

@oaratovskyi
Copy link
Contributor Author

oaratovskyi commented Sep 21, 2022

But I wonder why on your screenshots it looks good 🤔

Because I made them after installing the plugins 😅
It does not have gaps indeed when WCPay is disabled, how could I miss it 😅 🙈
Fixed in f165974

cc @ismaeldcom

@oaratovskyi
Copy link
Contributor Author

oaratovskyi commented Sep 21, 2022

@ismaeldcom I've also addressed all the nitpicks, thanks for catching those, now the gaps and links look consistent 🔥

<List items={ apmsList } />
</CardBody>
<CardFooter>
<ExternalLink href="https://woocommerce.com/product-category/woocommerce-extensions/payment-gateways/wallets/?categoryIds=28682&collections=product&page=1">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: This link is provided by Keala in DM when reviewed the functionality

Copy link
Contributor

@dmallory42 dmallory42 left a comment

Choose a reason for hiding this comment

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

Tested both locally and on a JN site, it's working well - the extensions were all installed and the tracking events were populated correctly - thanks for working on this!

I'll pre-approve it from a functionality POV, I know there were a few minor comments on styling, so once the designs and copy are all approved and the WC team have signed off we can :shipit:!

@oaratovskyi
Copy link
Contributor Author

Confirmed with Atlas that I am good to go with merging it (my changes don't break the tests)
p1663764252392999-slack-C03CPM3UXDJ

Copy link
Member

@chihsuan chihsuan left a comment

Choose a reason for hiding this comment

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

Excellent work! @oaratovskyi Tested well and LGTM. 🚀

@adrianduffell adrianduffell merged commit 013a5f2 into trunk Sep 23, 2022
@adrianduffell adrianduffell deleted the add/wcpay-4529-additional-pms-on-payments-welcome branch September 23, 2022 12:36
@github-actions github-actions bot added this to the 7.1.0 milestone Sep 23, 2022
@github-actions
Copy link
Contributor

Hi @adrianduffell, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Konamiman pushed a commit that referenced this pull request Sep 27, 2022
* Initial commit

* Implement APMs toggle button
- Add valid links to each APM
- Add valid link to the marketplace

* Implement APMs toggle button
- Add valid links to each APM
- Add valid link to the marketplace

* Refactor the code to be more explicit

* Delete the apm on toggle off if it's local state

* Implement FAQ simple block
- Style a notice about APM is enabled
- Add noreferrer and target=_blank to external links

* Add todo comments

* FAQ simple styling fix (improve padding)

* Fixes after inner review

* Add changelog item

* Address PR review comments

* Remove Affirm as it's not in the store

* Style fixes, proper internationalization and put valid link

* Styling fixes, translators comment, rename ApmsProps component to ApmListProps

* Two more styling fixes

* Styling fix

* Styling fix

* Remove text-decoration: none to match the design
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show APMs on the new Payments' menu in WooCommerce

6 participants