-
Notifications
You must be signed in to change notification settings - Fork 219
[Store Customization MVP] Verticals API client #10687
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +6.16 kB (0%) Total Size: 1.43 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 💃 !
Major kudos for adding the tests 🎉 !
Just left a comment regarding the error messages.
Thanks for the comments @nefeline, I've done some refactoring to the error handling, let me know what you think 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What
This PR adds a new
src/Verticals/Client.php
class (and tests) to connect to the Verticals API.It allows has 2 functions:
get_verticals
: returns all the verticals with images.get_vertical_images
: returns the images for a given vertical id.Fixes #10615
Why
This is the second step required for the Store Customization MVP project, described on #10503
Testing Instructions
Automated tests are in
tests/php/Verticals/ClientTest.php
.woocommerce-gutenberg-products-block.php
)Screenshots or screencast
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).